Title: [129009] trunk/Source/WebCore
Revision
129009
Author
[email protected]
Date
2012-09-19 08:30:43 -0700 (Wed, 19 Sep 2012)

Log Message

[CSSRegions][CSSOM] Make sure all Regions APIs are not visible if CSS_REGIONS is not defined
https://bugs.webkit.org/show_bug.cgi?id=96300

Patch by Raul Hudea <[email protected]> on 2012-09-19
Reviewed by Yury Semikhatsky.

All CSS Regions APIs should be exposed only if CSS_REGIONS is enabled

No new tests because of no behavior changes.

* css/StyleRule.cpp:
(WebCore::StyleRuleBase::reportMemoryUsage): Fix compile without CSS_REGIONS enabled and added an ASSERT_NOT_REACHED as in other functions
* dom/Element.cpp: Compile webkitRegionOverset only if CSS_REGIONS is enabled
(WebCore):
* dom/Element.h:
* dom/Element.idl: Expose webkitRegionOverset only if CSS_REGIONS is enabled

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (129008 => 129009)


--- trunk/Source/WebCore/ChangeLog	2012-09-19 15:12:46 UTC (rev 129008)
+++ trunk/Source/WebCore/ChangeLog	2012-09-19 15:30:43 UTC (rev 129009)
@@ -1,3 +1,21 @@
+2012-09-19  Raul Hudea  <[email protected]>
+
+        [CSSRegions][CSSOM] Make sure all Regions APIs are not visible if CSS_REGIONS is not defined
+        https://bugs.webkit.org/show_bug.cgi?id=96300
+
+        Reviewed by Yury Semikhatsky.
+
+        All CSS Regions APIs should be exposed only if CSS_REGIONS is enabled
+
+        No new tests because of no behavior changes.
+
+        * css/StyleRule.cpp:
+        (WebCore::StyleRuleBase::reportMemoryUsage): Fix compile without CSS_REGIONS enabled and added an ASSERT_NOT_REACHED as in other functions
+        * dom/Element.cpp: Compile webkitRegionOverset only if CSS_REGIONS is enabled
+        (WebCore):
+        * dom/Element.h:
+        * dom/Element.idl: Expose webkitRegionOverset only if CSS_REGIONS is enabled
+
 2012-09-19  Patrick Gansterer  <[email protected]>
 
         Remove all usages of M_PI from WebCore

Modified: trunk/Source/WebCore/css/StyleRule.cpp (129008 => 129009)


--- trunk/Source/WebCore/css/StyleRule.cpp	2012-09-19 15:12:46 UTC (rev 129008)
+++ trunk/Source/WebCore/css/StyleRule.cpp	2012-09-19 15:30:43 UTC (rev 129009)
@@ -81,7 +81,10 @@
     case Unknown:
     case Charset:
     case Keyframe:
-        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
+#if !ENABLE(CSS_REGIONS)
+    case Region:
+#endif
+        ASSERT_NOT_REACHED();
         return;
     }
     ASSERT_NOT_REACHED();

Modified: trunk/Source/WebCore/dom/Element.cpp (129008 => 129009)


--- trunk/Source/WebCore/dom/Element.cpp	2012-09-19 15:12:46 UTC (rev 129008)
+++ trunk/Source/WebCore/dom/Element.cpp	2012-09-19 15:30:43 UTC (rev 129009)
@@ -2033,6 +2033,8 @@
     return 0;
 }
 
+#if ENABLE(CSS_REGIONS)
+
 const AtomicString& Element::webkitRegionOverset() const
 {
     document()->updateLayoutIgnorePendingStylesheets();
@@ -2062,8 +2064,6 @@
     return undefinedState;
 }
 
-#if ENABLE(CSS_REGIONS)
-
 Vector<RefPtr<Range> > Element::webkitGetRegionFlowRanges() const
 {
     document()->updateLayoutIgnorePendingStylesheets();

Modified: trunk/Source/WebCore/dom/Element.h (129008 => 129009)


--- trunk/Source/WebCore/dom/Element.h	2012-09-19 15:12:46 UTC (rev 129008)
+++ trunk/Source/WebCore/dom/Element.h	2012-09-19 15:30:43 UTC (rev 129009)
@@ -426,8 +426,8 @@
     PassRefPtr<RenderStyle> styleForRenderer();
 
     RenderRegion* renderRegion() const;
+#if ENABLE(CSS_REGIONS)
     const AtomicString& webkitRegionOverset() const;
-#if ENABLE(CSS_REGIONS)
     Vector<RefPtr<Range> > webkitGetRegionFlowRanges() const;
 #endif
 

Modified: trunk/Source/WebCore/dom/Element.idl (129008 => 129009)


--- trunk/Source/WebCore/dom/Element.idl	2012-09-19 15:12:46 UTC (rev 129008)
+++ trunk/Source/WebCore/dom/Element.idl	2012-09-19 15:30:43 UTC (rev 129009)
@@ -143,7 +143,7 @@
         [Conditional=POINTER_LOCK, V8EnabledAtRuntime=pointerLock] void webkitRequestPointerLock();
 
         // CSS Regions API
-        readonly attribute DOMString webkitRegionOverset;
+        readonly attribute [Conditional=CSS_REGIONS] DOMString webkitRegionOverset;
         [Conditional=CSS_REGIONS] sequence<Range> webkitGetRegionFlowRanges();
 
 #if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to