Changeset 111419 in webkit
- Timestamp:
- Mar 20, 2012, 11:37:58 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r111412 r111419 1 2012-03-20 Dan Bernstein <mitz@apple.com> 2 3 REGRESSION (r111229): css1/basic/inheritance.html is failing 4 https://bugs.webkit.org/show_bug.cgi?id=81684 5 6 Reverted r111229. 7 8 Rubber-stamped by Dave Hyatt. 9 10 * fast/regions/webkit-named-flow-content-nodes-expected.txt: Removed. 11 * fast/regions/webkit-named-flow-content-nodes.html: Removed. 12 1 13 2012-03-20 Dan Bernstein <mitz@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r111416 r111419 1 2012-03-20 Dan Bernstein <mitz@apple.com> 2 3 REGRESSION (r111229): css1/basic/inheritance.html is failing 4 https://bugs.webkit.org/show_bug.cgi?id=81684 5 6 Reverted r111229. 7 8 Rubber-stamped by Dave Hyatt. 9 10 * dom/Document.cpp: 11 (WebCore::Document::webkitGetFlowByName): 12 * dom/Document.h: 13 (Document): 14 * dom/Element.cpp: 15 (WebCore::Element::detach): 16 * dom/NodeRenderingContext.cpp: 17 (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded): 18 * dom/WebKitNamedFlow.cpp: 19 (WebCore): 20 * dom/WebKitNamedFlow.h: 21 (WebCore): 22 (WebKitNamedFlow): 23 * dom/WebKitNamedFlow.idl: 24 1 25 2012-03-20 Vineet Chaudhary <rgf748@motorola.com> 2 26 -
trunk/Source/WebCore/dom/Document.cpp
r111361 r111419 1039 1039 PassRefPtr<WebKitNamedFlow> Document::webkitGetFlowByName(const String& flowName) 1040 1040 { 1041 return webkitGetFlowByName(flowName, CheckFlowNameForInvalidValues); 1042 } 1043 1044 PassRefPtr<WebKitNamedFlow> Document::webkitGetFlowByName(const String& flowName, FlowNameCheck flowNameCheck) 1045 { 1046 if (!cssRegionsEnabled() || !renderer()) 1041 if (!cssRegionsEnabled() || flowName.isEmpty() || !validFlowName(flowName) || !renderer()) 1047 1042 return 0; 1048 1043 1049 if (flowNameCheck == CheckFlowNameForInvalidValues) { 1050 if (flowName.isEmpty() || !validFlowName(flowName)) 1051 return 0; 1052 1053 // Make a slower check for invalid flow name 1054 CSSParser parser(true); 1055 if (!parser.parseFlowThread(flowName, this)) 1056 return 0; 1057 } 1044 // Make a slower check for invalid flow name 1045 CSSParser p(true); 1046 if (!p.parseFlowThread(flowName, this)) 1047 return 0; 1058 1048 1059 1049 if (RenderView* view = renderer()->view()) -
trunk/Source/WebCore/dom/Document.h
r111229 r111419 353 353 354 354 bool cssRegionsEnabled() const; 355 enum FlowNameCheck {356 CheckFlowNameForInvalidValues,357 DoNotCheckFlowNameForInvalidValues358 };359 355 PassRefPtr<WebKitNamedFlow> webkitGetFlowByName(const String&); 360 PassRefPtr<WebKitNamedFlow> webkitGetFlowByName(const String&, FlowNameCheck);361 356 362 357 bool regionBasedColumnsEnabled() const; -
trunk/Source/WebCore/dom/Element.cpp
r111229 r111419 67 67 #include "Text.h" 68 68 #include "TextIterator.h" 69 #include "WebKitMutationObserver.h" 69 70 #include "WebKitAnimationList.h" 70 #include "WebKitMutationObserver.h"71 #include "WebKitNamedFlow.h"72 71 #include "XMLNSNames.h" 73 72 #include "XMLNames.h" … … 981 980 RenderWidget::suspendWidgetHierarchyUpdates(); 982 981 983 if (document()->cssRegionsEnabled()) {984 RenderStyle* style = renderer() ? renderer()->style() : computedStyle();985 if (style && !style->flowThread().isEmpty()) {986 RefPtr<WebKitNamedFlow> namedFlow = document()->webkitGetFlowByName(style->flowThread(), Document::DoNotCheckFlowNameForInvalidValues);987 if (namedFlow)988 namedFlow->unregisterContentNode(this);989 }990 }991 992 982 cancelFocusAppearanceUpdate(); 993 983 if (hasRareData()) -
trunk/Source/WebCore/dom/NodeRenderingContext.cpp
r111229 r111419 39 39 #include "ShadowRoot.h" 40 40 #include "ShadowTree.h" 41 #include "WebKitNamedFlow.h"42 41 43 42 #if ENABLE(SVG) … … 329 328 ASSERT(m_node->document()->renderView()); 330 329 m_parentFlowRenderer = m_node->document()->renderView()->ensureRenderFlowThreadWithName(m_flowThread); 331 m_parentFlowRenderer->ensureNamedFlow()->registerContentNode(m_node);332 330 } 333 331 -
trunk/Source/WebCore/dom/WebKitNamedFlow.cpp
r111376 r111419 31 31 #include "WebKitNamedFlow.h" 32 32 33 #include "Node.h"34 #include "NodeList.h"35 33 #include "RenderFlowThread.h" 36 #include "RenderRegion.h"37 #include "StaticNodeList.h"38 34 39 35 namespace WebCore { … … 52 48 m_parentFlowThread->document()->updateLayoutIgnorePendingStylesheets(); 53 49 return m_parentFlowThread->overflow(); 54 }55 56 PassRefPtr<NodeList> WebKitNamedFlow::contentNodes() const57 {58 m_parentFlowThread->document()->updateLayoutIgnorePendingStylesheets();59 60 Vector<RefPtr<Node> > contentNodes;61 for (NamedFlowContentNodes::const_iterator it = m_contentNodes.begin(); it != m_contentNodes.end(); ++it) {62 Node* node = const_cast<Node*>(*it);63 ASSERT(node->computedStyle()->flowThread() == m_parentFlowThread->flowThread());64 contentNodes.append(node);65 }66 67 return StaticNodeList::adopt(contentNodes);68 }69 70 // The content nodes list contains those nodes with -webkit-flow-into: flow.71 // An element with display:none should also be listed among those nodes.72 // The list of nodes is orderer.73 void WebKitNamedFlow::registerContentNode(Node* contentNode)74 {75 ASSERT(contentNode && contentNode->isElementNode());76 77 // Find the first content node following the new content node.78 for (NamedFlowContentNodes::iterator it = m_contentNodes.begin(); it != m_contentNodes.end(); ++it) {79 Node* node = *it;80 unsigned short position = contentNode->compareDocumentPosition(node);81 if (position & Node::DOCUMENT_POSITION_FOLLOWING) {82 m_contentNodes.insertBefore(node, contentNode);83 return;84 }85 }86 m_contentNodes.add(contentNode);87 50 } 88 51 -
trunk/Source/WebCore/dom/WebKitNamedFlow.h
r111376 r111419 31 31 #define WebKitNamedFlow_h 32 32 33 #include <Node.h>34 #include <wtf/ListHashSet.h>35 33 #include <wtf/RefCounted.h> 36 34 #include <wtf/RefPtr.h> … … 38 36 namespace WebCore { 39 37 40 class NodeList;41 38 class RenderFlowThread; 42 39 … … 51 48 52 49 bool overflow() const; 53 PassRefPtr<NodeList> contentNodes() const;54 50 PassRefPtr<NodeList> getRegionsByContentNode(Node*); 55 56 void registerContentNode(Node* contentNode);57 void unregisterContentNode(Node* contentNode) { m_contentNodes.remove(contentNode); }58 51 59 52 private: … … 61 54 62 55 RenderFlowThread* m_parentFlowThread; 63 64 typedef ListHashSet<Node*> NamedFlowContentNodes;65 NamedFlowContentNodes m_contentNodes;66 56 }; 67 57 -
trunk/Source/WebCore/dom/WebKitNamedFlow.idl
r111376 r111419 33 33 ] WebKitNamedFlow { 34 34 readonly attribute boolean overflow; 35 readonly attribute NodeList contentNodes;36 35 NodeList getRegionsByContentNode(in Node contentNode); 37 36 };
Note:
See TracChangeset
for help on using the changeset viewer.