1 2012-07-13 Ryosuke Niwa <rniwa@webkit.org>
3 NodeLists should not invalidate on irreleavnt attribute changes
4 https://bugs.webkit.org/show_bug.cgi?id=91277
6 Reviewed by Ojan Vafai.
8 Explicitely check the invalidation type and the changed attribute in NodeListNodeData::invalidateCaches
9 and ElementRareData::clearHTMLCollectionCaches to only invalidate node lists affected by the change.
11 Also merged invalidateNodeListsCacheAfterAttributeChanged and invalidateNodeListsCacheAfterChildrenChanged
12 as invalidateNodeListCachesInAncestors since they're almost identical after r122498.
14 In addition, moved shouldInvalidateNodeListForType from Document.cpp to DynamicNodeList.h and renamed it to
15 shouldInvalidateTypeOnAttributeChange since it needs to called in Node.cpp and ElementRareData.h.
18 (WebCore::Attr::setValue):
19 (WebCore::Attr::childrenChanged):
20 * dom/ContainerNode.cpp:
21 (WebCore::ContainerNode::childrenChanged):
23 (WebCore::Document::registerNodeListCache): Calls isRootedAtDocument() instead of directly comparing
24 the value of NodeListRootType in order to prepare for the bug 80269.
25 (WebCore::Document::unregisterNodeListCache): Ditto.
26 (WebCore): shouldInvalidateNodeListForType is moved to DynamicNodeList.h
27 (WebCore::Document::shouldInvalidateNodeListCaches):
28 * dom/DynamicNodeList.h:
29 (DynamicNodeListCacheBase):
30 (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange): Moved from Document.cpp.
32 (WebCore::Element::attributeChanged):
33 * dom/ElementRareData.h:
34 (WebCore::ElementRareData::clearHTMLCollectionCaches): Takes const QualifiedName* to compare against
35 the invalidation type of HTML collections via shouldInvalidateTypeOnAttributeChange.
37 (WebCore::Node::invalidateNodeListCachesInAncestors): Merged invalidateNodeListCachesInAncestors and
38 invalidateNodeListsCacheAfterChildrenChanged. Also pass attrName to clearHTMLCollectionCaches.
39 (WebCore::NodeListsNodeData::invalidateCaches): Compares attrName against the invalidation type of
40 node lists via shouldInvalidateTypeOnAttributeChange.
45 (WebCore::NodeRareData::ensureNodeLists): Merged NodeRareData::createNodeLists.
46 (WebCore::NodeRareData::clearChildNodeListCache): Moved from Node.cpp.
48 * html/HTMLCollection.h:
49 (HTMLCollectionCacheBase):
51 2012-07-13 Arpita Bahuguna <arpitabahuguna@gmail.com>
53 Refactor RenderTable to use the section's iteration functions.
54 https://bugs.webkit.org/show_bug.cgi?id=89751
56 Reviewed by Julien Chaffraix.
58 Removing anti-pattern wherever possible from RenderTable code. Also, modifying
59 RenderTable sections' iterations to use helper functions.
61 No new tests required for this change since no change in behavior is expected.
63 * rendering/RenderTable.cpp:
64 (WebCore::RenderTable::addOverflowFromChildren):
65 (WebCore::RenderTable::setCellLogicalWidths):
66 (WebCore::RenderTable::outerBorderStart):
67 (WebCore::RenderTable::outerBorderEnd):
68 Removed anti-patterns involving iterations over RenderObjects.
70 (WebCore::RenderTable::outerBorderAfter):
71 Modified RenderTable sections' iteration to use helper functions.
73 2012-07-13 Enrica Casucci <enrica@apple.com>
75 Threadsafety issues in WebScriptObject
76 https://bugs.webkit.org/show_bug.cgi?id=90849
78 Reviewed by Geoff Garen.
80 Updated fix for this bug. The JSC API lock needs to be acquired also in JSObject.
82 * bindings/objc/WebScriptObject.mm:
83 (-[WebScriptObject JSObject]):
85 2012-07-13 Raymond Toy <rtoy@google.com>
87 DelayNode doesn't work if delayTime.value == delayTime.maxValue
88 https://bugs.webkit.org/show_bug.cgi?id=90357
90 Reviewed by Kenneth Russell.
92 Increase delay buffer size slightly so that the read and write
93 pointers don't become equal when the delay and the max delay are
96 Tests: webaudio/delaynode-max-default-delay.html
97 webaudio/delaynode-max-nondefault-delay.html
99 * Modules/webaudio/DelayDSPKernel.cpp:
100 (WebCore): Moved SmoothingTimeConstant to WebCore namespace.
101 (WebCore::DelayDSPKernel::DelayDSPKernel): Add some additional checks to prevent crashes; use bufferLengthForDelay to compute buffer length.
102 (WebCore::DelayDSPKernel::bufferLengthForDelay): New function to compute buffer length.
103 * Modules/webaudio/DelayDSPKernel.h:
104 (DelayDSPKernel): Declare bufferLengthForDelay.
106 2012-07-13 Benjamin Poulain <bpoulain@apple.com>
108 Always aggressively preload on iOS
109 https://bugs.webkit.org/show_bug.cgi?id=91276
111 Reviewed by Simon Fraser.
113 * loader/cache/CachedResourceLoader.cpp:
114 (WebCore::CachedResourceLoader::preload):
116 2012-07-13 Vineet Chaudhary <rgf748@motorola.com>
118 Restructure V8Utilities::extractTransferables() with help of toV8Sequence()
119 https://bugs.webkit.org/show_bug.cgi?id=91208
121 Reviewed by Kentaro Hara.
123 We can remove the specialised check for MessagePort from V8Utilities::extractTransferables()
124 using toV8Sequence() as it validates the passed object for sequence type per WebIDL spec.
126 No new test as just refactoring.
127 Existing tests under fast/dom/Window/window-* fast/dom/events/*
130 * bindings/v8/V8Utilities.cpp:
131 (WebCore::extractTransferables):
133 2012-07-13 Vincent Scheib <scheib@chromium.org>
135 Pointer Lock handles disconnected DOM elements
136 https://bugs.webkit.org/show_bug.cgi?id=77029
138 Reviewed by Adrienne Walker.
140 Pointer Lock Controller now checks when elements or documents are
141 removed, and unlocks if the target element is being removed.
143 Tests: pointer-lock/locked-element-iframe-removed-from-dom.html
144 pointer-lock/locked-element-removed-from-dom.html
147 (WebCore::Document::detach):
149 (WebCore::Element::removedFrom):
150 (WebCore::Element::webkitRequestPointerLock):
151 * page/PointerLockController.cpp:
152 (WebCore::PointerLockController::requestPointerLock):
153 (WebCore::PointerLockController::elementRemoved):
155 (WebCore::PointerLockController::documentDetached):
156 (WebCore::PointerLockController::didLosePointerLock):
157 (WebCore::PointerLockController::enqueueEvent):
158 * page/PointerLockController.h:
160 (PointerLockController):
162 2012-07-13 Ryosuke Niwa <rniwa@webkit.org>
164 HTMLCollection should use DynamicNodeList's invalidation model
165 https://bugs.webkit.org/show_bug.cgi?id=90326
167 Reviewed by Anders Carlsson.
169 Make HTMLCollection invalidated upon attribute and children changes instead of invalidating it on demand
170 by comparing DOM tree versions. Node that HTMLCollections owned by Document are invalidated with other
171 document-rooted node lists in m_listsInvalidatedAtDocument for simplicity although this mechanism is
172 normally used for node lists owned by a non-Document node that contains nodes outside of its subtree.
173 ItemProperties and FormControls are more "traditional" users of the mechanism.
175 Also, merged DynamicNodeList::invalidateCache and HTMLCollection::invalidateCache.
178 (WebCore::Document::registerNodeListCache): Renamed. No longer takes NodeListInvalidationType or
179 NodeListRootType since they can be obtained from the cache base. Increment the node list counter for
180 InvalidateOnIdNameAttrChange when a HTMLCollection is passed in since all HTMLCollections need to be
181 invalidated on id or name content attribute changes due to named getters.
182 (WebCore::Document::unregisterNodeListCache): Ditto.
183 (WebCore::shouldInvalidateNodeListForType):
184 (WebCore::Document::shouldInvalidateNodeListCaches):
185 (WebCore::Document::clearNodeListCaches):
187 (WebCore): Added InvalidateOnIdNameAttrChange, InvalidateOnHRefAttrChange, and InvalidateOnAnyAttrChange.
189 * dom/DynamicNodeList.cpp:
190 (WebCore::DynamicNodeListCacheBase::invalidateCache): Added. Invalidates caches of both DynamicNodeList
191 and HTMLCollection. We can't afford to use virtual function calls here because this function is called on
192 all node lists and HTML collections owned by ancestors of an element under which a node is added, removed,
193 or its attributes are changed.
195 * dom/DynamicNodeList.h:
196 (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): Initializes member variables directly
197 instead of calling clearCache now that DynamicNodeListCacheBase::invalidateCache has become polymorphic.
198 (DynamicNodeListCacheBase): Increased the number of bits for m_invalidationType since we now have 9
200 (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList):
201 (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
202 * dom/ElementRareData.h:
204 (WebCore::ElementRareData::clearHTMLCollectionCaches): Added.
205 (WebCore::ElementRareData::adoptTreeScope): Added; similar to NodeRareData::adoptTreeScope.
207 (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Clears HTML collection caches as well as
209 (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Ditto.
210 * dom/NodeRareData.h:
211 (WebCore::NodeListsNodeData::adoptTreeScope):
212 * dom/TreeScopeAdopter.cpp:
213 (WebCore::TreeScopeAdopter::moveTreeToNewScope): Calls ElementRareData's adoptTreeScope as well as
215 * html/HTMLAllCollection.cpp:
216 (WebCore::HTMLAllCollection::namedItemWithIndex):
217 * html/HTMLCollection.cpp:
218 (WebCore::rootTypeFromCollectionType): Added. As mentioned above, treat all Document-owned HTML collection
219 as if rooted at document for convenience.
220 (WebCore::invalidationTypeExcludingIdAndNameAttributes): Added. Since all HTML collection requires
221 invalidation on id and name content attribute changes, which is taken care by the special logic in
222 Document::registerNodeListCache, exclude those two attributes from consideration.
223 (WebCore::HTMLCollection::HTMLCollection): Calls Document::registerNodeListCache.
224 (WebCore::HTMLCollection::~HTMLCollection): Calls Document::unregisterNodeListCache.
225 (WebCore::HTMLCollection::length):
226 (WebCore::HTMLCollection::item):
227 (WebCore::HTMLCollection::namedItem):
228 (WebCore::HTMLCollection::updateNameCache):
229 * html/HTMLCollection.h:
230 (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
231 (HTMLCollectionCacheBase): Removed m_cacheTreeVersion and clearCache since they're no longer used.
233 * html/HTMLFormCollection.cpp:
234 (WebCore::HTMLFormCollection::namedItem):
235 (WebCore::HTMLFormCollection::updateNameCache):
236 * html/HTMLOptionsCollection.h:
237 (HTMLOptionsCollection):
238 * html/HTMLPropertiesCollection.cpp:
239 (WebCore::HTMLPropertiesCollection::updateNameCache):
240 * html/HTMLPropertiesCollection.h:
241 (WebCore::HTMLPropertiesCollection::invalidateCache):
243 2012-07-13 Shawn Singh <shawnsingh@chromium.org>
245 [chromium] Remove incorrect debug assertion in LayerRendererChromium.cpp
246 https://bugs.webkit.org/show_bug.cgi?id=91260
248 Reviewed by Adrienne Walker.
250 ASSERT(!clipped) was being triggered after skinny almost-degenerate
251 quads went through anti-aliasing inflation, and then were being
252 transformed back from device space to local space. It turns out
253 this assertion is too aggressive, and we don't yet have an obvious
254 need to change the behavior on the clipped==true case.
256 No new tests needed, this patch fixes only comments and debug code.
258 * platform/graphics/chromium/LayerRendererChromium.cpp:
259 (WebCore::LayerRendererChromium::drawRenderPassQuad):
262 (WebCore::LayerRendererChromium::drawTileQuad):
263 fixed a similar comment, removed unnecessary assertion.
265 2012-07-13 Philip Rogers <pdr@google.com>
267 Remove assert in localCoordinateSpaceTransform()
268 https://bugs.webkit.org/show_bug.cgi?id=91189
270 Reviewed by Nikolas Zimmermann.
272 The assert in localCoordinateSpaceTransform was added to catch subclasses forgetting
273 to override the method but it is better to simply return the identity matrix.
275 This scenario can occur when we break the SVG content model, such as asking for
276 the CTM of a <g> element inside a <tspan>. This is undefined in the spec because
277 tspan is not a subclass of SVGLocatable but both Firefox and Opera
278 implement this by returning the identity matrix.
280 Test: svg/custom/invalid-ctm.svg
282 * svg/SVGStyledElement.cpp:
283 (WebCore::SVGStyledElement::localCoordinateSpaceTransform):
285 2012-07-13 Kentaro Hara <haraken@chromium.org>
287 [V8] String wrappers should be marked Independent
288 https://bugs.webkit.org/show_bug.cgi?id=91251
290 Reviewed by Adam Barth.
292 Currently V8 String wrappers are not marked Independent.
293 By marking them Independent, they can be reclaimed by the scavenger GC.
295 I tried to find some cases where this change reduces memory usage,
296 but couldn't due to sensitive behavior of GC.
298 No tests. No change in behavior.
300 * bindings/v8/V8Binding.cpp:
301 (WebCore::StringCache::v8ExternalStringSlow):
303 2012-07-13 Peter Beverloo <peter@chromium.org>
305 [Chromium] Make the v8 i18n API dependency conditional for Android, disable strict aliasing
306 https://bugs.webkit.org/show_bug.cgi?id=91240
308 Reviewed by Adam Barth.
310 Disable the v8 internationalization API for Chromium Android, as it's
311 disabled and not always available in checkouts. Furthermore, disable
312 strict aliasing for the webkit_remaining target, similar to what
313 x11-based builds are doing (see the webcore_prerequisites target).
315 * WebCore.gyp/WebCore.gyp:
317 2012-07-13 Kentaro Hara <haraken@chromium.org>
319 [CallWith=XXX] arguments should be placed at the head of method arguments
320 https://bugs.webkit.org/show_bug.cgi?id=91217
322 Reviewed by Adam Barth.
324 The EFL build with the ENABLE_FILE_SYSTEM flag caused a build error,
325 because CodeGeneratorJS.pm assumes webkitEntries(ScriptExecutionContext*, HTMLInputElement*)
326 but the actual signature is webkitEntries(HTMLInputElement*, ScriptExecutionContext*) (bug 91185).
328 Per https://trac.webkit.org/wiki/WebKitIDL#CallWith, [CallWith=XXX] arguments should be placed
329 at the head of the arguments. (i.e. the behavior of CodeGeneratorJS.pm is correct.)
331 Thus the correct fix is (1) to change the signature of webkitEntries() and webkitGetAsEntry()
332 so that ScriptExecutionContext* comes first and (2) to modify CodeGeneratorV8.pm to support the order.
334 Test: bindings/scripts/test/TestObj.idl
336 * Modules/filesystem/DataTransferItemFileSystem.h: Placed ScriptExecutionContext* at the head of arguments.
337 (DataTransferItemFileSystem):
338 * Modules/filesystem/HTMLInputElementFileSystem.cpp: Ditto.
339 (WebCore::HTMLInputElementFileSystem::webkitEntries):
340 * Modules/filesystem/HTMLInputElementFileSystem.h: Ditto.
341 (HTMLInputElementFileSystem):
342 * Modules/filesystem/chromium/DataTransferItemFileSystemChromium.cpp: Ditto.
343 (WebCore::DataTransferItemFileSystem::webkitGetAsEntry):
345 * bindings/scripts/CodeGeneratorV8.pm: Modified to support the correct order.
346 (GenerateNormalAttrGetter):
347 (GenerateNormalAttrSetter):
348 (GenerateFunctionCallString):
350 * bindings/scripts/test/V8/V8TestInterface.cpp: Updated run-bindings-tests results.
351 (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
353 2012-07-13 Mary Wu <mary.wu@torchmobile.com.cn>
355 [BlackBerry] Some small changes in network code
356 https://bugs.webkit.org/show_bug.cgi?id=90974
358 Reviewed by Rob Buis.
360 1. Set status in NetworkJob/SocketStreamHandleBlackBerry so that
361 its wrapped stream can also query the stream result.
362 2. pass download attribute to NetworkRequest.
365 Reviewed internally by Lyon Chen and Joe Mason.
367 * platform/network/blackberry/NetworkJob.cpp:
368 (WebCore::NetworkJob::handleNotifyClose):
369 * platform/network/blackberry/NetworkJob.h:
370 (WebCore::NetworkJob::status):
371 * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
372 (WebCore::platformTargetTypeForRequest):
373 * platform/network/blackberry/SocketStreamHandle.h:
374 (WebCore::SocketStreamHandle::status):
375 (SocketStreamHandle):
376 * platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
377 (WebCore::SocketStreamHandle::notifyStatusReceived):
378 (WebCore::SocketStreamHandle::notifyClose):
380 2012-07-13 Vsevolod Vlasov <vsevik@chromium.org>
382 Web Inspector: Remove uiSourceCode from Resource.
383 https://bugs.webkit.org/show_bug.cgi?id=91201
385 Reviewed by Pavel Feldman.
387 Removed Resource._uiSourceCode field as it is not used anymore.
389 * inspector/front-end/Resource.js:
390 (WebInspector.Resource.prototype.isHidden):
391 * inspector/front-end/UISourceCode.js:
392 (WebInspector.UISourceCode):
394 2012-07-13 Sheriff Bot <webkit.review.bot@gmail.com>
396 Unreviewed, rolling out r122450 and r122580.
397 http://trac.webkit.org/changeset/122450
398 http://trac.webkit.org/changeset/122580
399 https://bugs.webkit.org/show_bug.cgi?id=91263
401 Caused multiple regressions on ClusterFuzz (Requested by
402 inferno-sec on #webkit).
404 * bindings/js/ScriptWrappable.h:
405 (WebCore::ScriptWrappable::reportMemoryUsage):
406 * bindings/v8/DOMDataStore.cpp:
407 (WebCore::DOMDataStore::reportMemoryUsage):
408 * bindings/v8/IntrusiveDOMWrapperMap.h:
409 (WebCore::ChunkedTable::reportMemoryUsage):
410 * bindings/v8/ScriptWrappable.h:
411 (WebCore::ScriptWrappable::reportMemoryUsage):
412 * bindings/v8/V8Binding.cpp:
413 (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
414 (WebCore::StringCache::reportMemoryUsage):
415 * bindings/v8/V8DOMMap.h:
416 * css/PropertySetCSSStyleDeclaration.cpp:
417 (WebCore::InlineCSSStyleDeclaration::ensureMutablePropertySet):
418 * css/StylePropertySet.cpp:
419 * css/StylePropertySet.h:
420 (WebCore::StylePropertySet::reportMemoryUsage):
421 * dom/CharacterData.cpp:
422 (WebCore::CharacterData::reportMemoryUsage):
423 * dom/ContainerNode.h:
424 (WebCore::ContainerNode::reportMemoryUsage):
426 (WebCore::Document::reportMemoryUsage):
428 (WebCore::Element::detachAttribute):
429 (WebCore::Element::removeAttribute):
430 (WebCore::Element::attributes):
431 (WebCore::Element::setAttributeInternal):
432 (WebCore::Element::parserSetAttributes):
433 (WebCore::Element::hasEquivalentAttributes):
434 (WebCore::Element::createAttributeData):
436 (WebCore::Element::setAttributeNode):
437 (WebCore::Element::removeAttributeNode):
438 (WebCore::Element::getAttributeNode):
439 (WebCore::Element::getAttributeNodeNS):
440 (WebCore::Element::hasAttribute):
441 (WebCore::Element::hasAttributeNS):
442 (WebCore::Element::normalizeAttributes):
443 (WebCore::Element::cloneAttributesFromElement):
445 (WebCore::Element::attributeData):
447 (WebCore::Element::reportMemoryUsage):
448 (WebCore::Element::ensureAttributeData):
449 (WebCore::Element::updatedAttributeData):
450 (WebCore::Element::ensureUpdatedAttributeData):
451 * dom/ElementAttributeData.cpp:
452 (WebCore::ElementAttributeData::attrIfExists):
453 (WebCore::ElementAttributeData::ensureAttr):
454 (WebCore::ElementAttributeData::setAttr):
455 (WebCore::ElementAttributeData::removeAttr):
456 (WebCore::ElementAttributeData::setClass):
458 (WebCore::ElementAttributeData::ensureInlineStyle):
459 (WebCore::ElementAttributeData::ensureMutableInlineStyle):
460 (WebCore::ElementAttributeData::destroyInlineStyle):
461 (WebCore::ElementAttributeData::addAttribute):
462 (WebCore::ElementAttributeData::removeAttribute):
463 (WebCore::ElementAttributeData::isEquivalent):
464 (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
465 (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
466 (WebCore::ElementAttributeData::cloneDataFrom):
467 (WebCore::ElementAttributeData::clearAttributes):
468 (WebCore::ElementAttributeData::replaceAttribute):
469 (WebCore::ElementAttributeData::getAttributeNode):
470 * dom/ElementAttributeData.h:
471 (WebCore::ElementAttributeData::create):
472 (ElementAttributeData):
473 (WebCore::ElementAttributeData::setIdForStyleResolution):
474 (WebCore::ElementAttributeData::setAttributeStyle):
475 (WebCore::ElementAttributeData::length):
476 (WebCore::ElementAttributeData::isEmpty):
477 (WebCore::ElementAttributeData::attributeItem):
478 (WebCore::ElementAttributeData::getAttributeItem):
479 (WebCore::ElementAttributeData::reportMemoryUsage):
480 (WebCore::ElementAttributeData::ElementAttributeData):
481 (WebCore::ElementAttributeData::attributeVector):
482 (WebCore::ElementAttributeData::clonedAttributeVector):
483 (WebCore::ElementAttributeData::removeAttribute):
484 (WebCore::ElementAttributeData::getAttributeItemIndex):
485 * dom/MemoryInstrumentation.h:
486 (MemoryInstrumentation):
488 (WebCore::MemoryObjectInfo::reportInstrumentedPointer):
489 (WebCore::MemoryObjectInfo::reportPointer):
490 (WebCore::MemoryObjectInfo::reportInstrumentedObject):
491 (WebCore::MemoryObjectInfo::reportObject):
492 (WebCore::MemoryObjectInfo::reportObjectInfo):
493 (WebCore::MemoryObjectInfo::reportHashMap):
494 (WebCore::MemoryObjectInfo::reportHashSet):
495 (WebCore::MemoryObjectInfo::reportListHashSet):
496 (WebCore::MemoryObjectInfo::reportVector):
497 (WebCore::MemoryObjectInfo::reportString):
498 (WebCore::MemoryObjectInfo::objectType):
499 (WebCore::MemoryObjectInfo::objectSize):
500 (WebCore::MemoryObjectInfo::memoryInstrumentation):
502 (WebCore::Node::reportMemoryUsage):
503 * dom/QualifiedName.h:
504 (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
505 (WebCore::QualifiedName::reportMemoryUsage):
506 * dom/StyledElement.cpp:
507 (WebCore::StyledElement::style):
508 (WebCore::StyledElement::classAttributeChanged):
509 (WebCore::StyledElement::setInlineStyleProperty):
510 (WebCore::StyledElement::removeInlineStyleProperty):
511 (WebCore::StyledElement::addSubresourceAttributeURLs):
512 * dom/StyledElement.h:
513 (WebCore::StyledElement::ensureInlineStyle):
514 * html/parser/HTMLConstructionSite.cpp:
515 (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
516 * platform/TreeShared.h:
517 (WebCore::TreeShared::reportMemoryUsage):
518 * xml/parser/XMLDocumentParserQt.cpp:
519 (WebCore::XMLDocumentParser::XMLDocumentParser):
521 2012-07-13 Huang Dongsung <luxtella@company100.net>
523 Remove down-casting to BitmapImage in GraphicsContext::drawImage.
524 https://bugs.webkit.org/show_bug.cgi?id=90755
526 Reviewed by Simon Fraser.
528 Add a BitmapImage draw method which takes RespectImageOrientationEnum enum as
529 the last argument for CG. Then we can remove the conditional down-casting in
530 GraphicsContext::drawImage.
532 This change is needed for parallel image decoders. Because parallel image
533 decoders use a Bitmap image wrapper class which extends Image (not Bitmap), the
534 down-casting above causes the loss of RespectImageOrientationEnum which must be
535 passed to BitmapImage.
537 No new tests, no behavior change.
539 * platform/graphics/BitmapImage.cpp:
540 * platform/graphics/BitmapImage.h:
541 * platform/graphics/GraphicsContext.cpp:
542 (WebCore::GraphicsContext::drawImage):
543 * platform/graphics/Image.cpp:
544 (WebCore::Image::draw):
546 * platform/graphics/Image.h:
549 2012-07-13 Lauro Neto <lauro.neto@openbossa.org>
551 Fix QtWebKit build with OpenGLES after GC3D/E3D refactor
552 https://bugs.webkit.org/show_bug.cgi?id=91156
554 Reviewed by Noam Rosenthal.
556 Adds several build fixes.
558 * platform/graphics/GraphicsContext3D.h:
559 Use E3DOpenGLES instead of previously removed E3DQt.
561 * platform/graphics/OpenGLESShims.h:
562 Enable defines for Qt.
564 * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
565 (WebCore::Extensions3DOpenGLES::blitFramebuffer):
567 (WebCore::Extensions3DOpenGLES::renderbufferStorageMultisample):
568 (WebCore::Extensions3DOpenGLES::copyTextureCHROMIUM):
569 Added pure virtual stubs.
571 (WebCore::Extensions3DOpenGLES::supportsExtension):
572 Remove PROC suffix. See bug #91130.
574 * platform/graphics/opengl/Extensions3DOpenGLES.h:
575 (Extensions3DOpenGLES):
576 Added pure virtual stubs.
578 * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
579 (WebCore::GraphicsContext3D::reshapeFBOs):
580 Readded missing function after removed in r122250.
583 Use PLATFORM(BLACKBERRY) guard around port-specific include.
585 * platform/graphics/qt/GraphicsContext3DQt.cpp:
586 Added USE(OPENGL_ES_2) guard instead of always loading the OpenGL extensions.
589 2012-07-13 Keishi Hattori <keishi@webkit.org>
591 Form of FormAssociatedElement is not updated when id target changes.
592 https://bugs.webkit.org/show_bug.cgi?id=91042
594 Reviewed by Kent Tamura.
596 Test: fast/forms/update-form-attribute-element.html
598 This patch introduces the IdTargetObserver and IdTargetObserverRegistry class.
599 They can be used to be notified when the element that an id is pointing to (the id target)
602 * CMakeLists.txt: Added IdTargetObserverRegistry.{h,cpp} and IdTargetObserver.{h,cpp}
603 * GNUmakefile.list.am: Ditto.
605 * WebCore.gypi: Ditto.
606 * WebCore.vcproj/WebCore.vcproj: Ditto.
607 * WebCore.xcodeproj/project.pbxproj: Ditto.
608 * dom/DOMAllInOne.cpp:
609 * dom/IdTargetObserver.cpp: Added. When you want notified of changes to an id target, you should create a new class that inherits this.
611 (WebCore::IdTargetObserver::IdTargetObserver):
612 (WebCore::IdTargetObserver::~IdTargetObserver):
613 * dom/IdTargetObserver.h: Added.
616 * dom/IdTargetObserverRegistry.cpp: Added.
618 (WebCore::IdTargetObserverRegistry::create):
619 (WebCore::IdTargetObserverRegistry::addObserver): Register an IdTargetObserver to observe an id target.
620 (WebCore::IdTargetObserverRegistry::removeObserver): Unregisters an IdTargetObserver from observing.
621 (WebCore::IdTargetObserverRegistry::notifyObserversInternal):
622 * dom/IdTargetObserverRegistry.h: Added.
624 (IdTargetObserverRegistry):
625 (WebCore::IdTargetObserverRegistry::IdTargetObserverRegistry):
626 (WebCore::IdTargetObserverRegistry::notifyObservers): Calls idTargetChanged on all observers for an id. Inlining first part of function for performance.
628 (WebCore::TreeScope::TreeScope):
629 (WebCore::TreeScope::addElementById): Calls IdTargetObserverRegistry::notifyObservers because the id target might have changed.
630 (WebCore::TreeScope::removeElementById): Ditto.
633 (WebCore::TreeScope::idTargetObserverRegistry):
635 * html/FormAssociatedElement.cpp: Observer for id targets defined by the form attribute.
636 (WebCore::FormAssociatedElement::didMoveToNewDocument):
637 (WebCore::FormAssociatedElement::insertedInto):
638 (WebCore::FormAssociatedElement::removedFrom):
639 (WebCore::FormAssociatedElement::formAttributeChanged):
640 (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver): Creates and sets up a new FormAttributeTargetObserver.
642 (WebCore::FormAssociatedElement::formAttributeTargetChanged):
643 (WebCore::FormAttributeTargetObserver::create):
644 (WebCore::FormAttributeTargetObserver::FormAttributeTargetObserver):
645 (WebCore::FormAttributeTargetObserver::idTargetChanged):
646 * html/FormAssociatedElement.h:
647 (FormAssociatedElement):
648 * html/FormController.cpp:
649 * html/FormController.h:
651 * html/HTMLFormElement.cpp:
652 (WebCore::HTMLFormElement::removedFrom):
653 (WebCore::HTMLFormElement::formElementIndexWithFormAttribute): Modified to take a range. It
654 scans the range and returns the index to insert the element in m_associatedElement.
655 (WebCore::HTMLFormElement::formElementIndex): Modified to only scan the elements in
656 m_associatedElement that precede and follow the form element.
657 * html/HTMLFormElement.h:
660 2012-07-13 Gabor Rapcsanyi <rgabor@webkit.org>
662 Optimizing blend filter to ARM-NEON with intrinsics
663 https://bugs.webkit.org/show_bug.cgi?id=90949
665 Reviewed by Zoltan Herczeg.
667 The feBlend SVG filter modes can be greatly fasten up with ARM-NEON since
668 we are able to calculate with 2 pixels (8 channels) at the same time.
669 The code is written with NEON intrinsics and it doesn't affect the
670 general - it has the same behaviour as the original algorithm.
671 With this NEON optimization the calculation is ~4.5 times faster for each mode.
673 Existing tests cover this issue.
676 * GNUmakefile.list.am:
679 * WebCore.vcproj/WebCore.vcproj:
680 * WebCore.xcodeproj/project.pbxproj:
681 * platform/graphics/filters/FEBlend.cpp:
682 (WebCore::FEBlend::platformApplyGeneric):
684 (WebCore::FEBlend::platformApplySoftware):
685 * platform/graphics/filters/FEBlend.h:
687 * platform/graphics/filters/arm/FEBlendNEON.h: Added.
689 (FEBlendUtilitiesNEON):
690 (WebCore::FEBlendUtilitiesNEON::div255): integer divison with 255
691 (WebCore::FEBlendUtilitiesNEON::normal): calculate normal mode blending for two pixels
692 (WebCore::FEBlendUtilitiesNEON::multiply): calculate multiply mode blending for two pixels
693 (WebCore::FEBlendUtilitiesNEON::screen): calculate screen mode blending for two pixels
694 (WebCore::FEBlendUtilitiesNEON::darken): calculate darken mode blending for two pixels
695 (WebCore::FEBlendUtilitiesNEON::lighten): calculate lighten mode blending for two pixels
696 (WebCore::FEBlend::platformApplyNEON):
698 2012-07-13 Ilya Tikhonovsky <loislo@chromium.org>
700 Web Inspector: native memory instrumentation: extract instrumentation methods into MemoryClassInfo
701 https://bugs.webkit.org/show_bug.cgi?id=91227
703 Reviewed by Pavel Feldman.
705 void Node::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
707 MemoryClassInfo<Node> info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
708 info.visitBaseClass<ScriptWrappable>(this);
710 info.addMember(m_notInstrumentedPointer); // automatically detects poniter/reference
711 info.addInstrumentedMember(m_next);
712 info.addHashSet<MemoryInstrumentation::NonClass>(m_aHash); // NonClass value_type (report only size of internal template structures)
713 info.addHashSet<MemoryInstrumentation::NotInstrumentedClass>(m_aHashSet); // not instrumented value_type (use sizeof)
714 info.addHashSet<MemoryInstrumentation::InstrumentedClass>(m_aHashSet); // instrumented value_type (call visit)
717 The change is covered by existing tests for native memory snapshot.
719 * bindings/v8/DOMDataStore.cpp:
720 (WebCore::DOMDataStore::reportMemoryUsage):
721 * bindings/v8/IntrusiveDOMWrapperMap.h:
722 (WebCore::ChunkedTable::reportMemoryUsage):
723 * bindings/v8/ScriptWrappable.h:
724 (WebCore::ScriptWrappable::reportMemoryUsage):
725 * bindings/v8/V8Binding.cpp:
726 (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
727 (WebCore::StringCache::reportMemoryUsage):
728 * bindings/v8/V8DOMMap.h:
729 * css/StylePropertySet.h:
730 (WebCore::StylePropertySet::reportMemoryUsage):
731 * dom/CharacterData.cpp:
732 (WebCore::CharacterData::reportMemoryUsage):
733 * dom/ContainerNode.h:
734 (WebCore::ContainerNode::reportMemoryUsage):
736 (WebCore::Document::reportMemoryUsage):
738 (WebCore::Element::reportMemoryUsage):
739 * dom/ElementAttributeData.h:
740 (WebCore::ElementAttributeData::reportMemoryUsage):
741 * dom/MemoryInstrumentation.h:
742 (MemoryInstrumentation):
743 (WebCore::MemoryObjectInfo::objectType):
744 (WebCore::MemoryObjectInfo::objectSize):
745 (WebCore::MemoryObjectInfo::memoryInstrumentation):
747 (WebCore::MemoryObjectInfo::reportObjectInfo):
750 (WebCore::MemoryClassInfo::MemoryClassInfo):
751 (WebCore::MemoryClassInfo::visitBaseClass):
752 (WebCore::MemoryClassInfo::reportInstrumentedPointer):
753 (WebCore::MemoryClassInfo::reportInstrumentedObject):
754 (WebCore::MemoryClassInfo::reportPointer):
755 (WebCore::MemoryClassInfo::reportObject):
756 (WebCore::MemoryClassInfo::reportHashMap):
757 (WebCore::MemoryClassInfo::reportHashSet):
758 (WebCore::MemoryClassInfo::reportListHashSet):
759 (WebCore::MemoryClassInfo::reportVector):
760 (WebCore::MemoryClassInfo::reportString):
762 (WebCore::Node::reportMemoryUsage):
763 * dom/QualifiedName.h:
764 (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
765 (WebCore::QualifiedName::reportMemoryUsage):
766 * platform/TreeShared.h:
767 (WebCore::TreeShared::reportMemoryUsage):
769 2012-07-13 Pavel Feldman <pfeldman@chromium.org>
771 Web Inspector: align scope filters
772 https://bugs.webkit.org/show_bug.cgi?id=91213
774 Reviewed by Vsevolod Vlasov.
776 * inspector/front-end/elementsPanel.css:
778 * inspector/front-end/inspector.css:
783 * inspector/front-end/networkLogView.css:
785 2012-07-13 Peter Rybin <peter.rybin@gmail.com>
787 Web Inspector: too many hardcoded strings in InspectorBackendDispatcher.
788 https://bugs.webkit.org/show_bug.cgi?id=89198
790 Reviewed by Yury Semikhatsky.
792 Instead of generating error message string on every call (mostly for nothing),
793 error message is generated deeper inside the handler and only command name
794 is passed every time.
796 * inspector/CodeGeneratorInspector.py:
797 (Generator.process_command):
799 2012-07-13 Joshua Netterfield <jnetterfield@rim.com>
801 [BlackBerry] Update about:* pages
802 https://bugs.webkit.org/show_bug.cgi?id=91121
806 Update the about:config pages, and improve the aesthetics of the about:build, about:version, about:credits, about:memory, about:config, and similar pages.
808 No new tests, because there is no new funtionality.
810 * platform/network/blackberry/NetworkJob.cpp: Update the aesthetics of about:* pages
812 2012-07-13 Olivier Blin <olivier.blin@softathome.com>
814 Fix checking for optional DeviceOrientationEvent.absolute in JSC bindings
815 https://bugs.webkit.org/show_bug.cgi?id=91225
817 Reviewed by Steve Block.
819 This issue comes from r105036
821 * bindings/js/JSDeviceOrientationEventCustom.cpp:
822 (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
824 2012-07-13 Andrei Bucur <abucur@adobe.com>
825 [CSS Regions] Fix build for bug 89000
826 https://bugs.webkit.org/show_bug.cgi?id=91215
828 Reviewed by Kentaro Hara.
830 Remove the unused variable m_state that was a leftover from a previous version of the patch.
832 Tests: No new tests, build fix.
834 * dom/WebKitNamedFlow.cpp:
835 (WebCore::WebKitNamedFlow::WebKitNamedFlow):
836 * dom/WebKitNamedFlow.h:
839 2012-07-13 Kenichi Ishibashi <bashi@chromium.org>
841 [Chromium] Fix bugs in HarfBuzzShaper
842 https://bugs.webkit.org/show_bug.cgi?id=90951
844 Reviewed by Tony Chang.
846 The current implementation has following problems:
847 - Cannot render RTL text if the TextRun is divided into more than two
849 - Script handling in TextRun partitioning is incorrect.
850 - Inaccurate calculation of selection rect.
851 - Wrong rendering position when the first glyph of the TextRun have
852 non-zero offsets in terms of HarfBuzz.
854 To fix these problems I rewrote HarfBuzzShaper class. Here is the summary:
855 - Divide the whole range of TextRun first, then shape them in visual
857 - Divide TextRun in the same way of old-harfbuzz's
858 hb_utf16_script_run_next().
859 - Prefer float than int when calculating selection.
860 - Adjust the drawing point after shaping.
862 Added tests covers the fix except for the last problem. The last problem will be covered
863 by fast/text/international/complex-joining-using-gpos.html after chromium linux port switches
864 to use HarfBuzzShaper.
866 Tests: fast/text/shaping/shaping-script-order.html
867 fast/text/shaping/shaping-selection-rect.html
869 * platform/graphics/harfbuzz/FontHarfBuzz.cpp:
870 (WebCore::Font::drawComplexText): Adjusts point after shaping.
871 * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
872 (WebCore::HarfBuzzShaper::HarfBuzzRun::HarfBuzzRun):
874 (WebCore::HarfBuzzShaper::HarfBuzzRun::applyShapeResult): Added.
875 (WebCore::HarfBuzzShaper::HarfBuzzRun::setGlyphAndAdvance): Offsets are no longer needed.
876 (WebCore::HarfBuzzShaper::HarfBuzzRun::xPositionForOffset): Calculates character offset based on advance.
877 (WebCore::normalizeCharacters): Added.
878 (WebCore::HarfBuzzShaper::HarfBuzzShaper):
879 (WebCore::HarfBuzzShaper::~HarfBuzzShaper):
880 (WebCore::HarfBuzzShaper::shape): Divides TextRun first, then shapes them.
881 (WebCore::HarfBuzzShaper::adjustStartPoint): Added.
882 (WebCore::HarfBuzzShaper::collectHarfBuzzRuns): Added.
883 (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Added.
884 (WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun): Followed other changes.
885 (WebCore::HarfBuzzShaper::selectionRect): Use float for calculating selection.
886 * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h:
887 (HarfBuzzShaper): Holds the start index of character. Removed unnecessary variables.
888 (WebCore::HarfBuzzShaper::HarfBuzzRun::create): Ditto.
890 (WebCore::HarfBuzzShaper::HarfBuzzRun::fontData): Added.
891 (WebCore::HarfBuzzShaper::HarfBuzzRun::startIndex): Ditto.
892 (WebCore::HarfBuzzShaper::HarfBuzzRun::glyphs): Ditto.
893 (WebCore::HarfBuzzShaper::HarfBuzzRun::advances): Ditto.
895 2012-07-13 Kentaro Hara <haraken@chromium.org>
897 Unreviewed, rolling out r122545.
898 http://trac.webkit.org/changeset/122545
899 https://bugs.webkit.org/show_bug.cgi?id=91185
901 We found that this was a wrong fix
903 * bindings/scripts/CodeGeneratorJS.pm:
904 (GenerateImplementation):
906 2012-07-13 Kentaro Hara <haraken@chromium.org>
908 Unreviewed, rolling out r122553.
909 http://trac.webkit.org/changeset/122553
910 https://bugs.webkit.org/show_bug.cgi?id=91198
912 We found that this was a wrong fix
914 * bindings/scripts/CodeGeneratorJS.pm:
915 (GenerateImplementation):
917 2012-07-13 Kent Tamura <tkent@chromium.org>
919 Change the timing of form state restore
920 https://bugs.webkit.org/show_bug.cgi?id=89962
922 Reviewed by Hajime Morita.
924 For a preparation to fix a form identification problem (Bug 91209),
925 restore controls states when the parsing of their owner forms is
926 completed. For controls without owners, their states are restored when
927 their parsing is completed as ever.
929 No new tests. This doesn't change observable behavior.
931 * html/FormController.cpp:
932 (WebCore::ownerFormForState):
933 Added. This code was used in formKey(), and restoreControlState*() use it.
934 (WebCore::FormKeyGenerator::formKey): Use ownerFormForState(). No behavior change.
935 (WebCore::FormController::restoreControlStateFor):
936 Moved some code from HTMLFormControlElementWithState::finishParsingChildren().
937 The difference is we don't resotre state if this control is owned by a form.
938 (WebCore::FormController::restoreControlStateIn):
939 Restore states of associated controls. This is called from
940 finishParsingChildren() for <form>.
941 * html/FormController.h:
943 - Declare restoreControlStateFor() and restoreControlStateIn().
944 - Make takeStateForFormElement() private.
946 * html/FormAssociatedElement.cpp:
947 (WebCore::FormAssociatedElement::isFormControlElementWithState):
948 Added. The default implementation returns false.
949 * html/FormAssociatedElement.h:
950 (FormAssociatedElement):
951 Added isFormControlElementWithState() for FormController::restoreControlStateIn().
952 * html/HTMLFormControlElementWithState.cpp:
953 (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
954 Some code was moved to FormController:restoreControlStateFor().
955 (WebCore::HTMLFormControlElementWithState::isFormControlElementWithState):
957 * html/HTMLFormControlElementWithState.h:
958 (HTMLFormControlElementWithState): Declare isFormControlElementWithState().
959 * html/HTMLFormElement.cpp:
960 (WebCore::HTMLFormElement::finishParsingChildren):
961 Added. Calls FormController::restoreControlStateIn().
962 * html/HTMLFormElement.h:
963 (HTMLFormElement): Declare finishParsingChildren().
965 2012-07-13 Kent Tamura <tkent@chromium.org>
967 Make calendar pickers testable
968 https://bugs.webkit.org/show_bug.cgi?id=84827
970 Reviewed by Hajime Morita.
973 - Add PagePopupDriver, an interface to open/close a PagePopup.
974 - Add setPagePopupDriver() to ChromeClient in order to inject a
975 PagePopupDriver for testing.
978 Add MockPagePopupDriver, which creates a MockPagePopup, which creates a
979 normal <iframe> in the top-level document, and load the popup content on
980 it. MockPagePopupDriver is enabled by
981 internals.settings.setEnableMockPagePopup(true).
983 Test: fast/forms/date/calendar-picker-appearance.html
985 * WebCore.gypi: Add new files.
986 * WebCore.xcodeproj/project.pbxproj: Add files to make this buildable.
987 * page/ChromeClient.h:
988 (ChromeClient): Add function for PagePopupDriver.
989 * loader/EmptyClients.h: Add empty implementations for PagePopupDriver functions.
990 * page/PagePopupDriver.h: Added.
992 (WebCore::PagePopupDriver::~PagePopupDriver):
994 * testing/InternalSettings.cpp:
995 (WebCore::InternalSettings::Backup::restoreTo): Reset the mock PagePopupDriver.
996 (WebCore::InternalSettings::setEnableMockPagePopup):
997 Register MockPagePopupDriver to ChromeClient.
998 * testing/InternalSettings.h:
999 (InternalSettings): Declare setEnableMockPagePopup().
1000 * testing/InternalSettings.idl: ditto.
1001 * testing/MockPagePopupDriver.cpp: Added.
1002 (MockPagePopup): Pseudo PagePopup implementation with the standard <iframe>.
1003 (WebCore::MockPagePopupDriver::MockPagePopupDriver): Added.
1004 (WebCore::MockPagePopupDriver::create): Added.
1005 (WebCore::MockPagePopupDriver::~MockPagePopupDriver): Added.
1006 (WebCore::MockPagePopupDriver::openPagePopup):
1007 Added. An override of PagePopupDriver function. This creates a MockPagePopup.
1008 (WebCore::MockPagePopupDriver::closePagePopup):
1009 Added. An override of PagePopupDriver function. This deletes the MockPagePopup.
1010 * testing/MockPagePopupDriver.h:
1011 (MockPagePopupDriver): Added.
1013 * testing/v8/WebCoreTestSupport.cpp:
1014 (WebCoreTestSupport::injectPagePopupController):
1015 Added. Production code uses per-Page context feature framework. However
1016 MockPagePopup uses the same page as the host page. So we can't use the
1017 framework and need to inject window.pagePopupController manually.
1018 * testing/v8/WebCoreTestSupport.h:
1019 (WebCoreTestSupport): Add injectPagePopupController().
1021 2012-07-12 Pavel Feldman <pfeldman@chromium.org>
1023 Web Inspector: mute the native looks of the selects in the console.
1024 https://bugs.webkit.org/show_bug.cgi?id=91120
1026 Reviewed by Vsevolod Vlasov.
1028 This is necessary for Mac now that we don't use border images for select.
1030 * inspector/front-end/ConsoleView.js:
1031 (WebInspector.ConsoleView.prototype.get statusBarItems):
1032 (WebInspector.ConsoleView.prototype.addContext):
1033 (WebInspector.ConsoleView.prototype.removeContext):
1034 (WebInspector.ConsoleView.prototype._updateIsolatedWorldSelector):
1035 (WebInspector.ConsoleView.prototype._appendIsolatedContextOption):
1036 (WebInspector.ConsoleView.prototype._currentEvaluationContext):
1037 (WebInspector.ConsoleView.prototype._currentIsolatedContextId):
1038 * inspector/front-end/StatusBarButton.js:
1039 (WebInspector.StatusBarComboBox):
1040 (WebInspector.StatusBarComboBox.prototype.addOption):
1041 (WebInspector.StatusBarComboBox.prototype.removeOption):
1042 (WebInspector.StatusBarComboBox.prototype.removeOptions):
1043 (WebInspector.StatusBarComboBox.prototype.selectedOption):
1044 * inspector/front-end/inspector.css:
1045 (.status-bar-select-container):
1046 (select.status-bar-item):
1049 2012-07-13 Andrei Bucur <abucur@adobe.com>
1051 [CSS Regions] Fix the lifecycle for the flow objects and their renderers
1052 https://bugs.webkit.org/show_bug.cgi?id=89000
1054 Reviewed by Eric Seidel.
1056 This patch adds the concept of a NamedFlowCollection, owned by the document, that keeps track of
1057 all the named flows that exist in the Document. This collection contains a ListHashSet of weak references to
1058 all the existing NamedFlows in the document. This is not a managed set because the CREATED flows are referenced from the renderer and
1059 the NULL flows are only cached, they should be destructible.
1060 Two named flows are considered to be equal if they have the same name.
1061 I've changed the NamedFlow state to depend on the existence of its renderer. A flow thread that has a renderer will also have a NamedFlow object.
1062 A flow thread without a renderer can have a NamedFlow object, but only in the NULL state. It's possible for a NamedFlow object to jump from the
1063 NULL state to the CREATED state if it was not destroyed (e.g. it was referenced from JS). Keeping track of the NULL state flows that have listeners will be important
1064 so when they go back to the CREATED state, the listeners would still be there.
1066 Link to spec: http://www.w3.org/TR/2012/WD-css3-regions-20120503/
1068 Tests: The old tests have been modified to take into account the new behavior
1071 * GNUmakefile.list.am:
1074 * WebCore.vcproj/WebCore.vcproj:
1075 * WebCore.xcodeproj/project.pbxproj:
1076 * dom/DOMAllInOne.cpp:
1078 (WebCore::Document::~Document):
1080 (WebCore::Document::webkitGetFlowByName):
1081 (WebCore::Document::namedFlows):
1085 * dom/WebKitNamedFlow.cpp:
1086 (WebCore::WebKitNamedFlow::WebKitNamedFlow):
1087 (WebCore::WebKitNamedFlow::~WebKitNamedFlow):
1088 (WebCore::WebKitNamedFlow::create):
1090 (WebCore::WebKitNamedFlow::name):
1091 (WebCore::WebKitNamedFlow::overset):
1092 (WebCore::nodeInFlowThread):
1093 (WebCore::WebKitNamedFlow::getRegionsByContentNode):
1094 (WebCore::WebKitNamedFlow::getContent):
1095 (WebCore::WebKitNamedFlow::setRenderer):
1096 * dom/WebKitNamedFlow.h:
1099 (WebCore::WebKitNamedFlow::getFlowState):
1100 (WebCore::WebKitNamedFlow::switchFlowState):
1101 * dom/WebKitNamedFlowCollection.cpp: Added.
1103 (WebCore::WebKitNamedFlowCollection::WebKitNamedFlowCollection):
1104 (WebCore::WebKitNamedFlowCollection::length): An O(1) operation
1105 (WebCore::WebKitNamedFlowCollection::item): An O(N) operation
1106 (WebCore::WebKitNamedFlowCollection::flowByName): An O(1) operation
1107 (WebCore::WebKitNamedFlowCollection::ensureNamedFlowInCreatedState): An O(1) operation
1108 (WebCore::WebKitNamedFlowCollection::moveNamedFlowToNullState): An O(1) operation
1109 (WebCore::WebKitNamedFlowCollection::discardNamedFlow): An O(1) operation
1110 (WebCore::WebKitNamedFlowCollection::documentDestroyed):
1111 (WebCore::WebKitNamedFlowCollection::NamedFlowHashFunctions::hash):
1112 (WebCore::WebKitNamedFlowCollection::NamedFlowHashFunctions::equal):
1113 (WebKitNamedFlowCollection::NamedFlowHashFunctions):
1114 (WebCore::WebKitNamedFlowCollection::NamedFlowHashTranslator::hash):
1115 (WebCore::WebKitNamedFlowCollection::NamedFlowHashTranslator::equal):
1116 * dom/WebKitNamedFlowCollection.h: Copied from Source/WebCore/dom/WebKitNamedFlow.h.
1118 (WebKitNamedFlowCollection):
1119 (WebCore::WebKitNamedFlowCollection::create):
1120 (WebCore::WebKitNamedFlowCollection::document):
1121 * rendering/FlowThreadController.cpp:
1122 (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
1123 (WebCore::FlowThreadController::removeFlowThread):
1125 * rendering/FlowThreadController.h:
1126 (FlowThreadController):
1127 * rendering/RenderNamedFlowThread.cpp:
1128 (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
1130 (WebCore::RenderNamedFlowThread::~RenderNamedFlowThread):
1131 (WebCore::RenderNamedFlowThread::removeRegionFromThread):
1132 (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentNode):
1133 (WebCore::RenderNamedFlowThread::flowThreadName):
1134 (WebCore::RenderNamedFlowThread::willBeDestroyed):
1135 * rendering/RenderNamedFlowThread.h:
1136 (RenderNamedFlowThread):
1137 (WebCore::RenderNamedFlowThread::contentNodes):
1138 (WebCore::RenderNamedFlowThread::canBeDestroyed):
1140 2012-07-13 Vineet Chaudhary <rgf748@motorola.com>
1142 [V8Bindings] Implement generalised method to validates that the passed object is a sequence type.
1143 https://bugs.webkit.org/show_bug.cgi?id=91056
1145 Reviewed by Kentaro Hara.
1147 Currently the V8 implementation validates that the passed object is a sequence type only
1148 for MessagePort in V8Utilities::extractTransferables().
1149 There should be generalised method for other types too.
1150 Spec URL: http://www.w3.org/TR/2012/WD-WebIDL-20120207/#es-sequence
1152 No new test, Just refactoring. There should be no behavioral changes.
1154 * bindings/v8/V8Binding.h:
1155 (WebCore::toV8Sequence): Added implementation of toV8Sequence().
1157 2012-07-13 Zeno Albisser <zeno@webkit.org>
1159 [Qt][WK2] Implement GraphicsSurface for Linux/GLX.
1160 https://bugs.webkit.org/show_bug.cgi?id=90881
1162 Add a GLX based GraphicsSurface implementation for Linux.
1163 Native X windows are being used for exchanging textures
1166 Reviewed by Noam Rosenthal.
1170 * platform/graphics/surfaces/GraphicsSurface.cpp:
1171 (WebCore::GraphicsSurface::create):
1172 Move creating GraphicsSurface instance into
1173 platformCreate/platformImport functions to allow
1174 platform specific creation based on the provided flags.
1175 (WebCore::GraphicsSurface::GraphicsSurface):
1176 (WebCore::GraphicsSurface::~GraphicsSurface):
1177 Call platformDestroy when destroying a GraphicsSurface.
1179 * platform/graphics/surfaces/GraphicsSurface.h:
1180 Make platformCreate/platformImport functions static
1181 to be able to call these from the static create function.
1182 Add Destructor prototype and add GraphicsSurfacePrivate member.
1185 * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
1187 (WebCore::GraphicsSurface::platformCreate):
1188 (WebCore::GraphicsSurface::platformImport):
1189 Insert creation of GraphicsSurface instance.
1190 This allows having a platform specific creation mechanism
1192 * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp: Added.
1194 (OffScreenRootWindow):
1195 (WebCore::OffScreenRootWindow::OffScreenRootWindow):
1196 (WebCore::OffScreenRootWindow::get):
1197 (WebCore::OffScreenRootWindow::~OffScreenRootWindow):
1198 Add an OffScreenRootWindow singelton that is being used
1199 as a parent for all native offscreen windows.
1200 (GraphicsSurfacePrivate):
1201 This class is used to manage all the X related resources
1202 such as opening a display or creating XPixmaps etc.
1203 (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
1204 Open a connection to the X server and create a
1205 QOpenGLContext that can be used to resolve GL functions.
1206 (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
1207 Properly cleanup and release all the X resources again.
1208 (WebCore::GraphicsSurfacePrivate::createSurface):
1209 Create a surface that is placed off screen and can be
1210 used as a rendering target by the WebProcess.
1211 (WebCore::GraphicsSurfacePrivate::createPixmap):
1212 Create a GLXPixmap from the XWindow that was previously
1213 redirected by the WebProcess. This GLXPixmap can then be
1214 bound to a texture and being painted on screen by the
1216 (WebCore::GraphicsSurfacePrivate::makeCurrent):
1217 (WebCore::GraphicsSurfacePrivate::swapBuffers):
1218 (WebCore::GraphicsSurfacePrivate::display):
1219 (WebCore::GraphicsSurfacePrivate::glxPixmap):
1220 (WebCore::GraphicsSurfacePrivate::size):
1221 (WebCore::GraphicsSurfacePrivate::glContext):
1222 (WebCore::resolveGLMethods):
1223 Initialize all the function pointers for the GL functions used.
1224 (WebCore::GraphicsSurface::platformExport):
1225 (WebCore::GraphicsSurface::platformGetTextureID):
1226 Bind the GLXPixmap to a texture.
1227 (WebCore::GraphicsSurface::platformCopyToGLTexture):
1228 Not beeing implemented for GLX.
1229 (WebCore::GraphicsSurface::platformCopyFromFramebuffer):
1230 Blit origin fbo onto the GraphicsSurface's backing.
1231 (WebCore::GraphicsSurface::platformCreate):
1232 (WebCore::GraphicsSurface::platformImport):
1233 (WebCore::GraphicsSurface::platformLock):
1234 (WebCore::GraphicsSurface::platformUnlock):
1235 (WebCore::GraphicsSurface::platformDestroy):
1237 2012-07-13 Dongwoo Im <dw.im@samsung.com>
1239 CodeGeneratorJS.pm : SetterExpression should use 'push' rather than 'unshift'
1240 https://bugs.webkit.org/show_bug.cgi?id=91198
1242 Reviewed by Kentaro Hara.
1244 'SetterExpression' should use 'push' to make arguments, rather than 'unshift'.
1246 No new tests. Covered by existing tests.
1248 * bindings/scripts/CodeGeneratorJS.pm:
1249 (GenerateImplementation):
1251 2012-07-13 Yoshifumi Inoue <yosin@chromium.org>
1253 REGRESSION(r119948): [Forms] Spin button Up/Down actions make value to zero for input type "number" when step mismatched
1254 https://bugs.webkit.org/show_bug.cgi?id=91197
1256 Reviewed by Kent Tamura.
1258 This patch fixes implementation of Decimal::ceiling() and floor().
1259 They return wrong value for small fractional numbers.
1261 The bug is occurred when:
1262 - Step-able input type, e.g. number, date, datetime, and so on.
1263 - Current value is step mismatched
1264 - Current value is smaller than step
1265 - Step up/down by spin button
1266 because spin button up/down actions are implemented in InputType::setpUpFromRenderer
1267 which calls Decimal::ceiling() and floor() for step mismatched case.
1269 Tests: fast/forms/number/number-stepup-stepdown-from-renderer.html: Added test cases
1270 WebKit/chromium/tests/DecimalTest.cpp: Added test cases
1272 * platform/Decimal.cpp:
1273 (WebCore::Decimal::ceiling): Changed to return 1 for positive small fractional number.
1274 (WebCore::Decimal::floor): Changed to return -1 for negative small fractional number.
1276 2012-07-13 Dominic Mazzoni <dmazzoni@google.com>
1278 Should be possible to focus elements within canvas fallback content
1279 https://bugs.webkit.org/show_bug.cgi?id=87898
1281 Reviewed by Chris Fleizach.
1283 Patches isFocusable in dom/Node.cpp and html/HTMLFormControlElement.cpp
1284 to make elements focusable if they're a descendent of a canvas element
1285 if they would otherwise have been focusable but just didn't have
1286 a renderer. Adds a bit to ElementRareData to efficiently keep track
1287 of elements in a canvas subtree.
1289 Test: fast/canvas/fallback-content.html
1292 (WebCore::Element::attach):
1293 (WebCore::Element::detach):
1294 (WebCore::Element::setIsInCanvasSubtree):
1296 (WebCore::Element::isInCanvasSubtree):
1299 * dom/ElementRareData.h:
1301 (WebCore::ElementRareData::ElementRareData):
1303 (WebCore::Node::isFocusable):
1304 * html/HTMLCanvasElement.cpp:
1305 (WebCore::HTMLCanvasElement::attach):
1307 * html/HTMLCanvasElement.h:
1308 (HTMLCanvasElement):
1309 * html/HTMLFormControlElement.cpp:
1310 (WebCore::HTMLFormControlElement::isFocusable):
1312 2012-07-12 Carlos Garcia Campos <cgarcia@igalia.com>
1314 [GTK] Add API to get HTTPS status to WebKit2 GTK+
1315 https://bugs.webkit.org/show_bug.cgi?id=91100
1317 Reviewed by Martin Robinson.
1319 * platform/network/soup/ResourceResponse.h:
1320 (WebCore::ResourceResponse::soupMessageCertificate): Return the
1322 (WebCore::ResourceResponse::setSoupMessageCertificate): Set a
1324 (WebCore::ResourceResponse::soupMessageTLSErrors): Return the TLS
1326 (WebCore::ResourceResponse::setSoupMessageTLSErrors): Set TLS
1328 * platform/network/soup/ResourceResponseSoup.cpp:
1329 (WebCore::ResourceResponse::toSoupMessage): Set the certificate
1330 and TLS errors to the newly created SoupMessage.
1331 (WebCore::ResourceResponse::updateFromSoupMessage): Get the
1332 certificate and TLS errors from the SoupMessage.
1334 2012-07-13 Ryosuke Niwa <rniwa@webkit.org>
1336 RadioNodeList is not updated upon input type change
1337 https://bugs.webkit.org/show_bug.cgi?id=91178
1339 Reviewed by Alexey Proskuryakov.
1341 Invalidate the radio node lists when type content attribute changes since it excludes
1342 image type input elements.
1344 Test: fast/forms/radionodelist-image-type.html
1347 (WebCore::shouldInvalidateNodeListForType):
1348 * dom/Document.h: Renamed InvalidateOnIdNameForAttrChange to InvalidateOnFormAttrChange
1349 since listing all attribute name isn't useful at this point.
1350 * html/RadioNodeList.cpp:
1351 (WebCore::RadioNodeList::RadioNodeList):
1353 2012-07-12 Dongwoo Im <dw.im@samsung.com>
1355 CodeGeneratorJS.pm need to handle the attribute which has "CallWith=ScriptExecutionContext" option.
1356 https://bugs.webkit.org/show_bug.cgi?id=91185
1358 Reviewed by Kentaro Hara.
1360 When an attribute has "CallWith=ScriptExecutionContext" option, 'ScriptExecutionContext*' parameter should be the last parameter.
1362 No new tests. Covered by existing tests.
1364 * bindings/scripts/CodeGeneratorJS.pm:
1365 (GenerateImplementation):
1367 2012-07-12 Yoshifumi Inoue <yosin@chromium.org>
1369 REGRESSION(r117738): [Forms] stepMismatch for input type "time" with large step value always return false.
1370 https://bugs.webkit.org/show_bug.cgi?id=91062
1372 Reviewed by Kent Tamura.
1374 This patch changes value of StepRange::acceptableError to zero for
1375 integer restricted step value.
1377 No new tests, existing test covers (fast/forms/time/ValidityState-stepMismatch-time.html) this change although they are listed in TestExpectation file.
1379 * html/StepRange.cpp:
1380 (WebCore::StepRange::acceptableError): Changed to return 0 if step value is restricted to be an integer.
1382 2012-07-12 Dan Bernstein <mitz@apple.com>
1384 Pass an option flag to CFStringGetHyphenationLocationBeforeIndex() that tells it to not
1385 terminate the search at the last word boundary before the given index.
1387 Reviewed by Adele Peterson.
1389 No test, because the current version of Core Foundation ignores the options parameter.
1391 * platform/text/cf/HyphenationCF.cpp:
1392 (WebCore::lastHyphenLocation): Changed the options parameter from 0 to 1.
1394 2012-07-12 Eric Seidel <eric@webkit.org>
1396 Incorrect behaviour calling Range setStart or setEnd with boundary in different document
1397 https://bugs.webkit.org/show_bug.cgi?id=42517
1399 Reviewed by Ojan Vafai.
1401 Added a new static inline "checkForDifferentRootContainer" to share some code
1402 and made setStart/setEnd do the right thing in the x-document case. I removed
1403 the bogus checks in set*After/set*Before functions, and since they just call
1404 through to setStart/setEnd, they also now do the right thing.
1406 Test: fast/dom/Range/set-wrong-document-err.html
1409 (WebCore::checkForDifferentRootContainer):
1411 (WebCore::Range::setStart):
1412 (WebCore::Range::setEnd):
1413 (WebCore::Range::setStartAfter):
1414 (WebCore::Range::setEndBefore):
1415 (WebCore::Range::setEndAfter):
1416 (WebCore::Range::setStartBefore):
1418 2012-07-12 Erik Arvidsson <arv@chromium.org>
1420 [V8] Simplify CodeGeneratorV8 since V8OnProto is only true for DOMWindow
1421 https://bugs.webkit.org/show_bug.cgi?id=91165
1423 Reviewed by Nate Chapin.
1425 The old code was dead code since V8OnProto only ever gets set to 1 for DOMWindow.
1427 No new tests. No change in functionality.
1429 * bindings/scripts/CodeGeneratorV8.pm:
1430 (GenerateNormalAttrSetter):
1432 2012-07-12 Ryosuke Niwa <rniwa@webkit.org>
1434 Build fix. Initialize unused const member variables to make compilers happy.
1436 * dom/DynamicNodeList.h:
1437 (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
1439 2012-07-12 Konrad Piascik <kpiascik@rim.com>
1441 Web Inspector: Geolocation override
1442 https://bugs.webkit.org/show_bug.cgi?id=89365
1444 Reviewed by Pavel Feldman.
1446 Reverted original patch.
1447 Change has not been reviewed by the right people. It declares
1448 public protocol methods and is wrong in several ways.
1450 * Modules/geolocation/GeolocationController.cpp:
1451 (WebCore::GeolocationController::GeolocationController):
1452 (WebCore::GeolocationController::positionChanged):
1453 * Modules/geolocation/GeolocationController.h:
1454 (GeolocationController):
1455 * inspector/Inspector.json:
1456 * inspector/InspectorInstrumentation.cpp:
1458 * inspector/InspectorInstrumentation.h:
1460 (InspectorInstrumentation):
1461 * inspector/InspectorPageAgent.cpp:
1462 (WebCore::InspectorPageAgent::InspectorPageAgent):
1463 * inspector/InspectorPageAgent.h:
1464 * inspector/front-end/Settings.js:
1465 * inspector/front-end/SettingsScreen.js:
1466 (WebInspector.UserAgentSettingsTab):
1467 (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement):
1468 * inspector/front-end/UserAgentSupport.js:
1470 2012-07-12 Ryosuke Niwa <rniwa@webkit.org>
1472 Move m_type and m_hasNameCache from HTMLCollectionCacheBase to DynamicNodeListCacheBase for better bit packing
1473 https://bugs.webkit.org/show_bug.cgi?id=91164
1475 Reviewed by Anders Carlsson.
1477 Moved m_type and m_hasNameCache from HTMLCollection and renamed them to m_collectionType and m_isNameCacheValid.
1479 Also renamed shouldIncludeChildren to shouldOnlyIncludeDirectChildren and negated the return value since
1480 all HTMLCollection include children in the collection and the function was meant to tell us whether the collection
1481 should include descendents that are not direct children of base().
1483 In addition, renamed nextNodeOrSibling to nextNode since "or sibling" doesn't seem to add any semantic clarity.
1485 * dom/DynamicNodeList.h:
1486 (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
1487 (DynamicNodeListCacheBase):
1488 (WebCore::DynamicNodeListCacheBase::type):
1489 (WebCore::DynamicNodeListCacheBase::hasNameCache):
1490 (WebCore::DynamicNodeListCacheBase::setHasNameCache):
1491 (WebCore::DynamicNodeListCacheBase::clearCache):
1492 * html/HTMLCollection.cpp:
1493 (WebCore::shouldOnlyIncludeDirectChildren):
1494 (WebCore::HTMLCollection::HTMLCollection):
1495 (WebCore::HTMLCollection::isAcceptableElement):
1496 (WebCore::nextNode):
1497 (WebCore::HTMLCollection::itemAfter):
1498 * html/HTMLCollection.h:
1499 (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
1500 (HTMLCollectionCacheBase):
1501 (WebCore::HTMLCollectionCacheBase::clearCache):
1503 2012-07-12 Shinya Kawanaka <shinyak@chromium.org>
1505 Needs callback before AuthorShadowRoot is added.
1506 https://bugs.webkit.org/show_bug.cgi?id=91167
1508 Reviewed by Hajime Morita.
1510 This is a preliminary patch for adding multiple Shadow DOM support for media elements and form elements.
1511 They assume that UserAgentShadowRoot is the oldest, however currently a page author may try to add
1512 AuthorShadowRoot before adding UserAgentShadowRoot.
1514 This patch adds a callback before AuthorShadowRoot is being added, and allow us to add UserAgentShadowRoot
1515 for those elements. See also Bug 77936, Bug 77937, Bug 90532.
1518 (WebCore::Element::willAddAuthorShadowRoot):
1519 * dom/ElementShadow.cpp:
1520 (WebCore::ElementShadow::addShadowRoot):
1521 * dom/ElementShadow.h:
1523 * dom/ShadowRoot.cpp:
1524 (WebCore::ShadowRoot::create):
1526 2012-07-12 Dana Jansens <danakj@chromium.org>
1528 [chromium] Remove the RenderPass pointer from RenderPassDrawQuad
1529 https://bugs.webkit.org/show_bug.cgi?id=91023
1531 Reviewed by Adrienne Walker.
1533 Removes the RenderPass pointer and keeps only an integer id in the
1534 quad to refer back to the RenderPass the quad reads from.
1536 Covered by existing tests.
1538 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1539 (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1540 (WebCore::findRenderPassById):
1542 (WebCore::removeRenderPassesRecursive):
1543 (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::shouldRemoveRenderPass):
1544 (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::shouldRemoveRenderPass):
1545 (WebCore::CCLayerTreeHostImpl::removeRenderPasses):
1546 (WebCore::CCLayerTreeHostImpl::prepareToDraw):
1547 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1549 (CullRenderPassesWithCachedTextures):
1550 (CullRenderPassesWithNoQuads):
1551 (CCLayerTreeHostImpl):
1552 * platform/graphics/chromium/cc/CCRenderPass.cpp:
1553 (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
1554 * platform/graphics/chromium/cc/CCRenderPass.h:
1556 * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
1557 (WebCore::CCRenderPassDrawQuad::create):
1558 (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
1559 * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
1560 (CCRenderPassDrawQuad):
1561 * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1562 (WebCore::CCRenderSurface::appendQuads):
1563 * platform/graphics/chromium/cc/CCRenderSurface.h:
1566 2012-07-12 Elliott Sprehn <esprehn@gmail.com>
1568 Unneeded tree walking when adding or removing children due to RenderCounter / RenderQuote logic
1569 https://bugs.webkit.org/show_bug.cgi?id=89900
1571 Reviewed by Eric Seidel and Abhishek Arya.
1573 Previously we would walk the all children a renderer whenever adding
1574 or removing a child renderer from its RenderObjectChildList to look for
1575 RenderQuote and RenderCounter instances to update. This patch introduces
1576 a counter in RenderView for the number of RenderQuote and RenderCounter
1577 instances in that document so we can avoid these traversals.
1579 No tests needed since this is just a short circuiting of logic and the existing
1580 tests should cover it.
1582 * rendering/RenderCounter.cpp:
1583 (WebCore::RenderCounter::RenderCounter): Increment instance counter.
1584 (WebCore::RenderCounter::willBeDestroyed): Decrement instance counter.
1586 (WebCore::RenderCounter::rendererRemovedFromTree): Short circuit when counter is zero.
1587 (WebCore::RenderCounter::rendererSubtreeAttached): Short circuit when counter is zero.
1588 * rendering/RenderCounter.h:
1590 * rendering/RenderObjectChildList.cpp:
1591 (WebCore::RenderObjectChildList::removeChildNode): Short circuit calling into Counter and Quote code when the document is being destroyed.
1592 * rendering/RenderQuote.cpp:
1593 (WebCore::RenderQuote::RenderQuote):
1594 (WebCore::RenderQuote::willBeDestroyed):
1596 (WebCore::RenderQuote::rendererSubtreeAttached): Increment instance counter.
1597 (WebCore::RenderQuote::rendererRemovedFromTree): Decrement instance counter.
1598 * rendering/RenderQuote.h:
1600 * rendering/RenderView.cpp:
1601 (WebCore::RenderView::RenderView):
1602 * rendering/RenderView.h: Methods for managing the RenderQuote and RenderCounter counts.
1604 (WebCore::RenderView::addRenderQuote):
1605 (WebCore::RenderView::removeRenderQuote):
1606 (WebCore::RenderView::hasRenderQuotes):
1607 (WebCore::RenderView::addRenderCounter):
1608 (WebCore::RenderView::removeRenderCounter):
1609 (WebCore::RenderView::hasRenderCounters):
1611 2012-07-12 Ryosuke Niwa <rniwa@webkit.org>
1613 Merge HTMLCollectionWithArrayStorage into HTMLCollection
1614 https://bugs.webkit.org/show_bug.cgi?id=91144
1616 Reviewed by Anders Carlsson.
1618 Merged HTMLCollectionWithArrayStorage::item into HTMLCollection::item and got rid of
1619 HTMLCollectionWithArrayStorage. Also de-virtualized HTMLCollection::item and HTMLCollection::length
1620 and merged itemInArrayAfter and itemAfter.
1622 In addition, improved the algorithm in HTMLCollection::length to take advantage of item cache.
1623 Instead of always computing the length from the beginning, we start the search from the cached item
1624 so that if we're near end of the collection, we avoid significant portion of the node traversal.
1626 Furthermore, made HTMLCollection always call setItemCache with a non-null item and HTMLCollection::item
1627 set the length cache when it reaches the end of the collection to avoid redundant length calculations.
1629 * dom/DynamicNodeList.h:
1630 (WebCore::DynamicNodeListCacheBase::setItemCache): Add a FIXME.
1631 * html/HTMLCollection.cpp:
1632 (WebCore::HTMLCollection::itemAfter): Regular HTMLCollection doesn't have uses elements array so
1633 assert that offsetInArray is always 0.
1634 (WebCore): Removed calcLength.
1635 (WebCore::HTMLCollection::length): Rewritten. The algorithm is as follows:
1636 When there is no item cache, we look for the first item by calling item(0). If item(0) returns null,
1637 then it must have set the length cache so bail out. If the previous step didn't bail out, then
1638 the item cache is valid and not null (see above), so count the number of remaining items in collection
1639 starting at the cached item's offset + 1.
1640 (WebCore::HTMLCollection::item): Avoid calling setItemCache with null. When the first item is null,
1641 set the length cache instead.
1642 (WebCore::HTMLCollection::itemAfterCachedItem): Extracted from HTMLCollectionWithArrayStorage::item.
1643 (WebCore::HTMLCollection::namedItem): Pass in arrayOffset to itemAfter. Note this variable is never
1644 used since only HTMLFormCollection and HTMLPropertiesCollection use array offsets but they override
1646 (WebCore::HTMLCollection::updateNameCache): Ditto.
1647 * html/HTMLCollection.h:
1650 * html/HTMLFormCollection.cpp: Removed calcLength(). Even though this function didn't iterate over
1651 the collection directly, HTMLFormElement::length and HTMLFieldSetElement::length did so we're not
1652 regressing any performance here.
1653 (WebCore::HTMLFormCollection::HTMLFormCollection):
1654 (WebCore::HTMLFormCollection::itemAfter):
1655 * html/HTMLFormCollection.h:
1656 (HTMLFormCollection):
1657 * html/HTMLNameCollection.cpp:
1658 (WebCore::HTMLNameCollection::itemAfter):
1659 * html/HTMLNameCollection.h:
1660 (HTMLNameCollection):
1661 * html/HTMLPropertiesCollection.cpp: Removed calcLength().
1662 (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
1663 (WebCore::HTMLPropertiesCollection::itemAfter):
1665 * html/HTMLPropertiesCollection.h:
1666 (HTMLPropertiesCollection):
1667 * html/HTMLTableRowsCollection.cpp:
1668 (WebCore::HTMLTableRowsCollection::itemAfter):
1669 * html/HTMLTableRowsCollection.h:
1670 (HTMLTableRowsCollection):
1672 2012-07-12 Pravin D <pravind.2k4@gmail.com>
1674 Row size/position is wrongly calculated when table having overlapping rowspan cell and colspan cell
1675 https://bugs.webkit.org/show_bug.cgi?id=16811
1677 Reviewed by Julien Chaffraix.
1679 The height of a row is calculated by taking the max height of the cells contained in it. When a row contains
1680 a rowSpan cell and if this row is not the last row of the cell, then its height is max height of other non
1681 rowSpan cells. If the row is the last row of the rowSpan cell, then using the contraint laid by CSS2.1 spec
1682 "For a rowSpan cell, the sum of the row heights involved must be great enough to encompass the cell spanning the rows",
1683 the last remaining height of the rowSpan(cell height minus heights of other involved rows) is taken into consideration
1684 while calculating the height of this row.
1685 Currently when calculating the height of the row we are only using the height of the primary cell at position (row, col).
1686 However when a row has colSpan cell and rowSpan, they might overlap. In such a sitution as only the primary cells height
1687 is considered, the height of the row will be calculated worngly if the other overlapping cell has greater height.
1688 Thus all the overlapping cell at position (row, col) must be considered while calculating the height of a row.
1690 Test: fast/table/last-cell-of-rowspan-overlapping-colspan-cell.html
1692 * rendering/RenderTableSection.cpp:
1693 (WebCore::RenderTableSection::calcRowLogicalHeight):
1694 Fixed function to use all the overlapping cells at position(row, col) to calculate the height/position of rows.
1696 2012-07-12 Joshua Bell <jsbell@chromium.org>
1698 IndexedDB: Enable IDBFactory.deleteDatabase() and webkitGetDatabaseNames() in Workers
1699 https://bugs.webkit.org/show_bug.cgi?id=90310
1701 Reviewed by Tony Chang.
1703 Simplify Document vs. Worker logic for IDBFactory::open() and hook up the
1704 other two IDBFactory methods for use by workers as well.
1706 Test: storage/indexeddb/factory-basics-workers.html
1708 * Modules/indexeddb/IDBFactory.cpp:
1709 (isContextValid): Helper function consolidating checks that context is usable.
1710 (getIndexedDBDatabasePath): Helper function for accessing group settings.
1711 (WebCore::IDBFactory::getDatabaseNames): Simplify - just pass context through to back end.
1712 (WebCore::IDBFactory::open): Ditto.
1713 (WebCore::IDBFactory::deleteDatabase): Ditto.
1714 (WebCore::IDBFactory::cmp): Whitespace.
1715 * Modules/indexeddb/IDBFactoryBackendImpl.cpp: Obsolete openFromWorker() removed.
1716 (WebCore::IDBFactoryBackendImpl::getDatabaseNames): Signature updated.
1717 (WebCore::IDBFactoryBackendImpl::deleteDatabase): Signature updated.
1718 (WebCore::IDBFactoryBackendImpl::open): Signature updated.
1719 * Modules/indexeddb/IDBFactoryBackendImpl.h:
1720 (IDBFactoryBackendImpl):
1721 * Modules/indexeddb/IDBFactoryBackendInterface.h: Interface methods now take both SecurityOrigin
1722 and ScriptExecutionContext, but not Frame. In the proxy, SecurityOrigin is redundant (can be
1723 accessed from context) but on the real back end the context is null (as Frame was previously).
1724 (IDBFactoryBackendInterface):
1725 * inspector/InspectorIndexedDBAgent.cpp:
1727 (WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame):
1728 (WebCore::InspectorIndexedDBAgent::requestDatabase):
1729 (WebCore::InspectorIndexedDBAgent::requestData):
1731 2012-07-12 Dana Jansens <danakj@chromium.org>
1733 [chromium] The root layer should not try create a second RenderSurface for itself
1734 https://bugs.webkit.org/show_bug.cgi?id=91124
1736 Reviewed by Adrienne Walker.
1738 Tests: CCLayerTreeHostImplTest.rootLayerDoesntCreateExtraSurface
1740 * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
1741 (WebCore::subtreeShouldRenderToSeparateSurface):
1743 2012-07-12 Adam Barth <abarth@webkit.org>
1745 Regression (r122359) Layout Test html5lib/runner.html is failing
1746 https://bugs.webkit.org/show_bug.cgi?id=91047
1748 Reviewed by Tony Chang.
1750 This ASSERT is bogus because doctypes can be removed from the DOM and
1753 Test: fast/viewport/viewport-legacy-xhtmlmp-remove-and-add.html
1756 (WebCore::Document::setDocType):
1758 2012-07-12 Ojan Vafai <ojan@chromium.org>
1760 Implied minimum size of flex items is min-content
1761 https://bugs.webkit.org/show_bug.cgi?id=87546
1763 Reviewed by Tony Chang.
1765 http://dev.w3.org/csswg/css3-flexbox/#min-size-auto
1766 In the main axis direction, min-size of auto means min-content.
1768 Test: css3/flexbox/flex-item-min-size.html
1770 * rendering/RenderBox.cpp:
1771 (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
1772 (WebCore::RenderBox::computeContentLogicalHeightUsing):
1773 (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1774 (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1775 (WebCore::RenderBox::computePositionedLogicalWidthUsing):
1776 (WebCore::RenderBox::computePositionedLogicalHeightUsing):
1777 It turned out that these FIXMEs are all unnecessary with the changes to RenderFlexibleBox.
1779 * rendering/RenderFlexibleBox.cpp:
1780 (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
1781 (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
1783 2012-07-12 Eric Penner <epenner@google.com>
1785 [chromium] Use CCTexture/TextureAllocator and remove TextureManager
1786 https://bugs.webkit.org/show_bug.cgi?id=91001
1788 Reviewed by Adrienne Walker.
1790 Use CCTexture to clean up CCPrioritizedTexture::Backing.
1791 Add TextureAllocator.h and remove remainder of TextureManager.h/cpp.
1792 Minor move/refactoring of link/unlink in CCPrioritizedTexture.
1793 Remove double initialization of the default memory limit.
1795 Covered by existing tests (refactoring).
1798 * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
1799 * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
1801 * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
1802 * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
1804 * platform/graphics/chromium/ImageLayerChromium.cpp:
1805 * platform/graphics/chromium/LayerRendererChromium.cpp:
1806 (WebCore::LayerRendererChromium::initialize):
1807 * platform/graphics/chromium/ManagedTexture.cpp: Removed.
1808 * platform/graphics/chromium/ManagedTexture.h: Removed.
1809 * platform/graphics/chromium/RenderSurfaceChromium.h:
1811 * platform/graphics/chromium/TextureAllocator.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCPriorityCalculator.h.
1814 (WebCore::TextureAllocator::~TextureAllocator):
1815 * platform/graphics/chromium/TextureManager.cpp: Removed.
1816 * platform/graphics/chromium/TextureManager.h: Removed.
1817 * platform/graphics/chromium/TiledLayerChromium.cpp:
1818 * platform/graphics/chromium/TrackingTextureAllocator.cpp:
1819 (WebCore::TrackingTextureAllocator::createTexture):
1820 (WebCore::TrackingTextureAllocator::deleteTexture):
1821 * platform/graphics/chromium/TrackingTextureAllocator.h:
1822 * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1823 * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1824 (WebCore::CCLayerTreeHost::prioritizeTextures):
1825 * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1827 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1828 (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
1829 * platform/graphics/chromium/cc/CCPrioritizedTexture.cpp:
1830 (WebCore::CCPrioritizedTexture::CCPrioritizedTexture):
1831 (WebCore::CCPrioritizedTexture::setDimensions):
1832 (WebCore::CCPrioritizedTexture::textureId):
1833 (WebCore::CCPrioritizedTexture::bindTexture):
1834 (WebCore::CCPrioritizedTexture::framebufferTexture2D):
1835 (WebCore::CCPrioritizedTexture::link):
1837 (WebCore::CCPrioritizedTexture::unlink):
1838 * platform/graphics/chromium/cc/CCPrioritizedTexture.h:
1840 (WebCore::CCPrioritizedTexture::bytes):
1841 (CCPrioritizedTexture):
1842 (WebCore::CCPrioritizedTexture::haveBackingTexture):
1843 (WebCore::CCPrioritizedTexture::Backing::Backing):
1844 (WebCore::CCPrioritizedTexture::Backing::~Backing):
1845 (WebCore::CCPrioritizedTexture::Backing::owner):
1847 (WebCore::CCPrioritizedTexture::backing):
1848 * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp:
1849 (WebCore::CCPrioritizedTextureManager::prioritizeTextures):
1850 (WebCore::CCPrioritizedTextureManager::requestLate):
1851 (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded):
1852 (WebCore::CCPrioritizedTextureManager::reduceMemory):
1853 (WebCore::CCPrioritizedTextureManager::clearAllMemory):
1854 (WebCore::CCPrioritizedTextureManager::registerTexture):
1855 (WebCore::CCPrioritizedTextureManager::returnBackingTexture):
1856 (WebCore::CCPrioritizedTextureManager::createBacking):
1857 (WebCore::CCPrioritizedTextureManager::destroyBacking):
1858 (WebCore::CCPrioritizedTextureManager::assertInvariants):
1859 * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h:
1860 (CCPrioritizedTextureManager):
1861 (WebCore::CCPrioritizedTextureManager::defaultMemoryAllocationLimit):
1862 (WebCore::CCPrioritizedTextureManager::compareBackings):
1863 * platform/graphics/chromium/cc/CCPriorityCalculator.h:
1864 * platform/graphics/chromium/cc/CCScopedTexture.cpp:
1865 * platform/graphics/chromium/cc/CCScopedTexture.h:
1866 * platform/graphics/chromium/cc/CCTexture.h:
1867 (WebCore::CCTexture::CCTexture):
1868 * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
1870 * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
1872 2012-07-12 Ryosuke Niwa <rniwa@webkit.org>
1874 Let XCode have its own way.
1876 * WebCore.xcodeproj/project.pbxproj:
1878 2012-07-12 Julien Chaffraix <jchaffraix@webkit.org>
1880 ASSERT(genChild->isListMarker() || genChild->style()->styleType() == FIRST_LETTER) triggered on flex-box content
1881 https://bugs.webkit.org/show_bug.cgi?id=91003
1883 Reviewed by Abhishek Arya.
1885 Tests: fast/flexbox/assert-generated-deprecated-flexbox.html
1886 fast/flexbox/assert-generated-new-flexbox.html
1888 The issue was that findBeforeAfterParent didn't return the right parent for the flex-box case. This would
1889 make us update the wrong children (and not propagate the style updates properly).
1891 * rendering/RenderObjectChildList.cpp:
1892 (WebCore::findBeforeAfterParent):
1893 Added a check for flex boxes (both deprecated and new).
1895 2012-07-12 Pravin D <pravind.2k4@gmail.com>
1897 Percentage width replaced element in zero percent/fixed width container block incorrectly rendered.
1898 https://bugs.webkit.org/show_bug.cgi?id=9493
1900 Reviewed by Andy Estes.
1902 When the width of the container is zero percent/fixed value then the width of the replaced element must also be zero.
1904 Test: fast/css/percent-width-img-inside-zero-percent-and-fixed-container.html
1906 * rendering/RenderBox.cpp:
1907 (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1908 When the containing block's available width is zero there can be two cases.
1909 The containing block is floated/positioned in which case the width of the replaced child element must be its instrinsic width.
1910 On the other hand if the width of the container is specified to be either zero percent or fixed value then the width of the
1911 replaced elment must be zero.
1913 2012-07-11 Ryosuke Niwa <rniwa@webkit.org>
1915 invalidateNodeListsCacheAfterAttributeChanged should dynamically figure out which attribute needs invalidation
1916 https://bugs.webkit.org/show_bug.cgi?id=91046
1918 Reviewed by Anders Carlsson.
1920 Added an array of counters (m_nodeListCounts) for each set of attributes (NodeListInvalidationType) node lists care about
1921 to Document, and made DynamicSubtreeNodeList's constructor and destructor increment and decrement these counters via
1922 registerDynamicSubtreeNodeList and unregisterDynamicSubtreeNodeList respectively. shouldInvalidateDynamicSubtreeNodeList,
1923 which is called by invalidateNodeListsCacheAfterAttributeChanged, then use these counters to determine whether a given
1924 attribute change should result in node list invalidations.
1926 Also removed m_numNodeListCaches from TreeScope because this counter has now become redundant with m_nodeListCounts.
1928 * dom/ChildNodeList.cpp:
1929 (WebCore::ChildNodeList::ChildNodeList): Do not invalidate on attribute changes.
1930 * dom/ClassNodeList.cpp:
1931 (WebCore::ClassNodeList::ClassNodeList): Invalidate on class attribute changes.
1933 (WebCore::Document::Document): Initialize m_nodeListCounts.
1934 (WebCore::Document::~Document): Add assertions to make sure m_listsInvalidatedAtDocument, m_nodeListCounts, and
1935 m_collections are all empty.
1936 (WebCore::Document::registerDynamicSubtreeNodeList): This function is now called for all DynamicSubtreeNodeLists supposed
1937 to just ones rooted at the document in order to increment the counter for each invalidation type.
1938 (WebCore::Document::unregisterDynamicSubtreeNodeList): Ditto.
1939 (WebCore::shouldInvalidateDynamicSubtreeNodeListForType): Checks the attribute name against NodeListInvalidationType.
1940 (WebCore::Document::shouldInvalidateDynamicSubtreeNodeList): Returns true if the given attribute name matches the invalidation
1941 type of the existing DynamicSubtreeNodeLists in the document. If the attribute name is not given (used when children change),
1942 then it checks for the existence of any DynamicSubtreeNodeLists. Conceptually, this function can be written as a list of
1943 "if" statements that checks values in m_nodeListCounts and the attribute name. We use "for" loop and switch statement instead
1944 to share logic and detect future addition of values to NodeListInvalidationType.
1946 (Document): Moved RootType and InvalidationType from DynamicNodeListCacheBase and renamed them to NodeListRootType and
1947 NodeListInvalidationType respectively in order to reduce the possibility of future name collisions. Also the invalidation type
1948 now contains 6 values instead of 2.
1949 * dom/DynamicNodeList.cpp:
1951 * dom/DynamicNodeList.h:
1952 (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
1953 (WebCore::DynamicNodeListCacheBase::shouldInvalidateOnAttributeChange):
1954 (WebCore::DynamicNodeListCacheBase::rootType): Added.
1955 (WebCore::DynamicNodeListCacheBase::invalidationType): Added.
1956 (DynamicNodeListCacheBase): Uses 3 bits to store invalidation type now that the number of values have increased from 2 to 6.
1957 (WebCore::DynamicNodeList::DynamicNodeList):
1958 (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList): Call unregisterDynamicSubtreeNodeList.
1959 (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList): Call registerDynamicSubtreeNodeList.
1960 * dom/MicroDataItemList.cpp:
1961 (WebCore::MicroDataItemList::MicroDataItemList): Invalidate on itemscope, itemprop, and itemtype content attribute changes.
1962 * dom/NameNodeList.cpp:
1963 (WebCore::NameNodeList::NameNodeList): Invalidate on name attribute changes.
1965 (WebCore::Node::clearRareData):
1966 (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Replaced the hard coded check list of attributes, by a call
1967 to shouldInvalidateDynamicSubtreeNodeList.
1968 (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Calls shouldInvalidateDynamicSubtreeNodeList.
1969 (WebCore::Node::getElementsByTagName):
1970 (WebCore::Node::getElementsByTagNameNS):
1971 (WebCore::Node::getElementsByName):
1972 (WebCore::Node::getElementsByClassName):
1973 (WebCore::Node::radioNodeList):
1974 (WebCore::NodeRareData::createNodeLists):
1975 * dom/NodeRareData.h:
1976 (WebCore::NodeListsNodeData::adoptTreeScope): Unregister and register node lists in m_tagNodeListCacheNS since all node lists
1977 need to be accounted in m_nodeListCounts.
1978 (WebCore::NodeRareData::ensureNodeLists):
1980 * dom/TagNodeList.cpp:
1981 (WebCore::TagNodeList::TagNodeList): Do not invalidate on any attribute changes.
1982 * dom/TreeScope.cpp:
1983 (WebCore::TreeScope::TreeScope): No longer initializes m_numNodeListCaches since it has been removed.
1985 (TreeScope): Removed m_numNodeListCaches.
1986 * dom/TreeScopeAdopter.cpp:
1987 (WebCore::TreeScopeAdopter::moveTreeToNewScope):
1988 * html/HTMLCollection.h:
1989 (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase): Just pass in DoNotInvalidateOnAttributeChanges for now since
1990 it's never used in HTMLCollections.
1991 * html/LabelableElement.cpp:
1992 (WebCore::LabelableElement::labels):
1993 * html/LabelsNodeList.cpp:
1994 (WebCore::LabelsNodeList::LabelsNodeList): Invalidate on for content attribute changes.
1995 (WebCore::LabelsNodeList::~LabelsNodeList):
1996 * html/RadioNodeList.cpp:
1997 (WebCore::RadioNodeList::RadioNodeList): Invalidate on id, name, and for content attribute changes.
1998 (WebCore::RadioNodeList::~RadioNodeList):
2000 2012-07-12 Gavin Barraclough <barraclough@apple.com>
2002 Threadsafety issues in WebScriptObject
2003 https://bugs.webkit.org/show_bug.cgi?id=90849
2005 Reviewed by Filip Pizlo & Oliver Hunt.
2007 Updated fix for this bug. Taking the JSC API lock from WebScriptObject::release
2008 may not be safe; better to just guard the JSWrapperCache with its own spinlock.
2010 * bindings/objc/WebScriptObject.mm:
2011 (WebCore::getJSWrapper):
2012 - Added spinlock; also retain/autorelease the returned wrapper - it is unsafe
2013 to wait for the caller to do so, due to a race condition vs release removing
2014 the wrapper from the map.
2015 (WebCore::addJSWrapper):
2016 - Take the spinlock guarding the cache.
2017 (WebCore::removeJSWrapper):
2018 - Take the spinlock guarding the cache.
2019 (WebCore::removeJSWrapperIfRetainCountOne):
2020 - Take the spinlock guarding the cache, remove the wrapper if retainCount is one.
2021 (WebCore::createJSWrapper):
2022 - Remove the API lock; this method no longer needs to retain/autorelease (this is
2023 done by getJSWrapper).
2024 (-[WebScriptObject _setImp:originRootObject:rootObject:]):
2025 - Remove the API lock.
2026 (-[WebScriptObject release]):
2027 - Remove the API lock, retainCount check moved into removeJSWrapperIfRetainCountOne.
2029 2012-07-11 David Hyatt <hyatt@apple.com>
2031 https://bugs.webkit.org/show_bug.cgi?id=91000
2032 REGRESSION (r122244): Overflow elements don't shrink as much as they should.
2034 Reviewed by Simon Fraser.
2036 This is a fix for a a regression from https://bugs.webkit.org/show_bug.cgi?id=90646.
2038 I incorrectly analyzed the issue with Robert Hogan's negative margin patch and fooled myself into putting back
2039 in an incorrect minimum width check from long ago.
2041 What should have happened in the test case I patched is that the overflow element should shrink to 0. The issue
2042 with improving the logical top estimate in the previous patch is it made the clear delta become 0. This in turn
2043 exposed a bug in our clearing algorithm with Robert's changes where you could need a relayout even if you didn't
2044 actually move. This issue only occurs because the floats list is getting changed mid-layout because of negative margins.
2046 The patch changes getClearDelta to call setChildNeedsLayout(true) on children whose widths change even when their
2047 positions do not. In effect this dynamic addition of new floats after you have done a layout on the child already means
2048 that you can need to lay out again despite not actually having to move.
2050 To handle this, the code that does the relayout is now called if the child needs a relayout. This is done even if
2051 the logical top estimate matches the final position.
2053 No new tests required, since the test in fast/block/float is now correctly covering the issue.
2055 * rendering/RenderBlock.cpp:
2056 (WebCore::RenderBlock::layoutBlockChild):
2057 (WebCore::RenderBlock::getClearDelta):
2058 * rendering/RenderBox.cpp:
2059 (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
2061 2012-07-12 James Weatherall <wez@chromium.org>
2063 storage tests are flaky (crashing) on windows
2064 https://bugs.webkit.org/show_bug.cgi?id=90469
2066 Reviewed by Kentaro Hara.
2068 Add a missing check that the underlying V8 object reference in a V8 NPObject is valid, and zero the NPObject's rootObject member when disposing it, to ensure that it won't be mistakenly touched after that point.
2070 This patch is intended to resolve flakiness in the storage tests including:
2071 storage/indexeddb/mozilla/indexes.html
2072 storage/indexeddb/mozilla/key-requirements-inline-and-passed.html
2073 storage/websql/multiple-databases-garbage-collection.html
2075 * bindings/v8/NPV8Object.cpp:
2076 (WebCore::disposeUnderlyingV8Object):
2077 Zero the NPObject's underlying rootObject.
2078 (_NPN_EvaluateHelper):
2079 Add check that the underlying V8 object reference is valid.
2081 2012-07-12 No'am Rosenthal <noam.rosenthal@nokia.com>
2083 Move TextureMapperAnimation and texmap/LayerTransform to platform/graphics
2084 https://bugs.webkit.org/show_bug.cgi?id=91111
2086 Reviewed by Kenneth Rohde Christiansen.
2088 TextureMapperAnimation and LayerTransform are not specific to TextureMapper, and we want
2089 to use them for other purposes as well. Moving them to platform/graphics would make that
2092 No new tests, moving files around.
2094 * GNUmakefile.list.am:
2097 * platform/graphics/GraphicsLayerAnimation.cpp: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp.
2098 * platform/graphics/GraphicsLayerAnimation.h: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.h.
2099 * platform/graphics/GraphicsLayerTransform.cpp: Renamed from Source/WebCore/platform/graphics/texmap/LayerTransform.cpp.
2100 * platform/graphics/GraphicsLayerTransform.h: Renamed from Source/WebCore/platform/graphics/texmap/LayerTransform.h.
2101 * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2102 (WebCore::GraphicsLayerTextureMapper::addAnimation):
2103 * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2104 (GraphicsLayerTextureMapper):
2105 * platform/graphics/texmap/TextureMapperLayer.h:
2106 (TextureMapperLayer):
2107 (WebCore::TextureMapperLayer::setAnimatedTransform):
2108 (WebCore::TextureMapperLayer::setAnimatedOpacity):
2110 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org>
2112 Web Inspector: Simplify UISourceCode code after moving revisions support inside it.
2113 https://bugs.webkit.org/show_bug.cgi?id=91118
2115 Reviewed by Pavel Feldman.
2117 * inspector/front-end/UISourceCode.js:
2118 (WebInspector.UISourceCode.prototype._setContent):
2119 (WebInspector.UISourceCode.prototype.revertToOriginal):
2120 (WebInspector.UISourceCode.prototype.revertAndClearHistory):
2121 (WebInspector.UISourceCode.prototype.contentChanged):
2122 (WebInspector.UISourceCode.prototype.commitWorkingCopy):
2123 (WebInspector.Revision.prototype.revertToThis):
2125 2012-07-12 Allan Sandfeld Jensen <allan.jensen@nokia.com>
2127 Unreviewed. Build fix for r122462.
2129 * platform/qt/MemoryUsageSupportQt.cpp:
2131 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org>
2133 Web Inspector: Remove resources panel edited resources search support.
2134 https://bugs.webkit.org/show_bug.cgi?id=91101
2136 Reviewed by Pavel Feldman.
2138 * inspector/front-end/ResourcesPanel.js:
2139 (WebInspector.ResourcesPanel.prototype.performSearch.callback):
2140 (WebInspector.ResourcesPanel.prototype.performSearch):
2142 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org>
2144 Unreviewed r122460 inspector closure compilation fix follow up.
2146 * inspector/front-end/RevisionHistoryView.js:
2147 (WebInspector.RevisionHistoryView):
2149 2012-07-12 Ilya Tikhonovsky <loislo@chromium.org>
2151 Web Inspector: fix native memory instrumentation code for the bindings instrumentation.
2152 https://bugs.webkit.org/show_bug.cgi?id=91096
2154 The instrumented class has to have instrumentation method which reports class size and type and
2155 the member objects and pointers.
2158 void Node::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
2160 memoryObjectInfo->reportObjectInfo(this, MemoryInstrumentation::DOM); // report object size and type.
2161 TreeShared<Node, ContainerNode>::reportMemoryUsage(memoryObjectInfo); // call base class instrumentation.
2162 ScriptWrappable::reportMemoryUsage(memoryObjectInfo); // call base class instrumentation.
2163 memoryObjectInfo->reportPointer(m_document, MemoryInstrumentation::DOM); // report uninstrumented pointer.
2164 memoryObjectInfo->reportInstrumentedPointer(m_next); // report instrumented pointer.
2165 memoryObjectInfo->reportInstrumentedObject(m_anObject); // report instrumented object.
2168 Reviewed by Pavel Feldman.
2170 Existing tests for native memory instrumentation.
2172 * bindings/v8/DOMDataStore.cpp:
2173 (WebCore::DOMDataStore::reportMemoryUsage):
2174 * bindings/v8/DOMDataStore.h:
2177 * bindings/v8/IntrusiveDOMWrapperMap.h:
2178 (WebCore::ChunkedTable::reportMemoryUsage):
2179 * bindings/v8/ScriptProfiler.cpp:
2180 (WebCore::ScriptProfiler::collectBindingMemoryInfo):
2181 * bindings/v8/V8Binding.cpp:
2182 (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
2183 (WebCore::StringCache::reportMemoryUsage):
2184 * bindings/v8/V8Binding.h:
2187 (V8BindingPerIsolateData):
2188 * bindings/v8/V8DOMMap.h:
2190 (AbstractWeakReferenceMap):
2191 * inspector/InspectorMemoryAgent.cpp:
2194 2012-07-12 Pavel Feldman <pfeldman@chromium.org>
2196 Web Inspector: beautify find bar looks, simplify search update routines.
2197 https://bugs.webkit.org/show_bug.cgi?id=91087
2199 Reviewed by Vsevolod Vlasov.
2201 This change updates the looks to the one on the screenshots and simplifies match count update routines.
2203 * inspector/front-end/SearchController.js:
2204 (WebInspector.SearchController.onMatchesMouseDown):
2205 (WebInspector.SearchController):
2206 (WebInspector.SearchController.prototype.activePanelChanged.performPanelSearch):
2207 (WebInspector.SearchController.prototype.activePanelChanged):
2208 (WebInspector.SearchController.prototype._updateSearchNavigationButtonState):
2209 (WebInspector.SearchController.prototype._updateSearchMatchesCountAndCurrentMatchIndex):
2210 (WebInspector.SearchController.prototype._onKeyDown):
2211 (WebInspector.SearchController.prototype._onInput):
2212 (WebInspector.SearchController.prototype._onNextButtonSearch):
2213 (WebInspector.SearchController.prototype._onPrevButtonSearch):
2214 (WebInspector.SearchController.prototype._performSearch):
2215 * inspector/front-end/inspector.css:
2218 (.toolbar-search-navigation-controls):
2219 (.toolbar-search-navigation):
2220 (.toolbar-search-navigation.enabled:hover):
2221 (.toolbar-search-navigation.enabled, .toolbar-search-navigation.enabled:active):
2223 (.toolbar-search-control):
2224 (.search-results-matches):
2225 (.inspector-footer):
2227 2012-07-12 Joshua Bell <jsbell@chromium.org>
2229 IndexedDB: ASSERT hit calling open from callback in Worker
2230 https://bugs.webkit.org/show_bug.cgi?id=90832
2232 Reviewed by Kentaro Hara.
2234 GroupSettings are used to provide the backing store path in some
2235 ports. Accessing those settings from a Worker was added, but the
2236 access referenced thread startup data that is cleared before the
2237 run loop, so an IDBFactory.open() call executed asynchronously
2238 would dereference a null pointer. Plumb the settings startup
2239 data into the context itself, like all of the other properties.
2241 Test: storage/indexeddb/open-twice-workers.html
2243 * Modules/indexeddb/IDBFactory.cpp:
2244 (WebCore::IDBFactory::open):
2245 * workers/DedicatedWorkerContext.cpp:
2246 (WebCore::DedicatedWorkerContext::DedicatedWorkerContext):
2247 * workers/DedicatedWorkerContext.h:
2248 (WebCore::DedicatedWorkerContext::create):
2249 (DedicatedWorkerContext):
2250 * workers/DedicatedWorkerThread.cpp:
2251 (WebCore::DedicatedWorkerThread::createWorkerContext):
2252 * workers/DedicatedWorkerThread.h:
2253 (DedicatedWorkerThread):
2254 * workers/SharedWorkerContext.cpp:
2255 (WebCore::SharedWorkerContext::SharedWorkerContext):
2256 * workers/SharedWorkerContext.h:
2257 (WebCore::SharedWorkerContext::create):
2258 (SharedWorkerContext):
2259 * workers/SharedWorkerThread.cpp:
2260 (WebCore::SharedWorkerThread::createWorkerContext):
2261 * workers/SharedWorkerThread.h:
2262 (SharedWorkerThread):
2263 * workers/WorkerContext.cpp:
2264 (WebCore::WorkerContext::WorkerContext):
2265 * workers/WorkerContext.h:
2266 (WebCore::WorkerContext::groupSettings):
2268 * workers/WorkerThread.cpp:
2269 (WebCore::WorkerThread::workerThread):
2270 * workers/WorkerThread.h:
2273 2012-07-12 Allan Sandfeld Jensen <allan.jensen@nokia.com>
2275 [Qt] Implement MemoryUsageSupport
2276 https://bugs.webkit.org/show_bug.cgi?id=91094
2278 Reviewed by Adam Barth.
2280 Implements Qt versions of the memory-usage functions using the information we have available
2281 from the various memory systems used in WebKit.
2283 Also gets rid of a redundant indirection in V8GCController.
2286 * bindings/v8/V8GCController.cpp:
2287 (WebCore::V8GCController::gcEpilogue):
2288 (WebCore::V8GCController::checkMemoryUsage):
2289 * platform/qt/MemoryUsageSupportQt.cpp: Added.
2290 (WebCore::mallocMemoryUsage):
2291 (WebCore::memoryUsageKB):
2292 (WebCore::actualMemoryUsageKB):
2293 (WebCore::MemoryUsageSupport::memoryUsageMB):
2294 (WebCore::MemoryUsageSupport::actualMemoryUsageMB):
2295 (WebCore::MemoryUsageSupport::lowMemoryUsageMB):
2296 (WebCore::MemoryUsageSupport::highMemoryUsageMB):
2297 (WebCore::MemoryUsageSupport::highUsageDeltaMB):
2298 (WebCore::MemoryUsageSupport::processMemorySizesInBytes):
2299 * platform/qt/PlatformSupport.h:
2302 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org>
2304 Web Inspector: Revision history view should be updated when uiSourceCodes are removed or replaced.
2305 https://bugs.webkit.org/show_bug.cgi?id=91095
2307 Reviewed by Pavel Feldman.
2309 RevisionHistoryView is now reset in WorkspaceReset event handler.
2310 UISourceCodes are now removed from RevisionHistoryView when uiSourceCode is removed or replace.
2312 * inspector/front-end/RevisionHistoryView.js:
2313 (WebInspector.RevisionHistoryView):
2314 (WebInspector.RevisionHistoryView.prototype._clearHistory):
2315 (WebInspector.RevisionHistoryView.prototype._uiSourceCodeRemoved):
2316 (WebInspector.RevisionHistoryView.prototype._uiSourceCodeReplaced):
2317 * inspector/front-end/ScriptsPanel.js:
2318 (WebInspector.ScriptsPanel.prototype._reset):
2320 2012-07-12 Dongwoo Im <dw.im@samsung.com>
2322 InspectorFileSystemAgent.cpp have to include File.h explicitly
2323 https://bugs.webkit.org/show_bug.cgi?id=91078
2325 Reviewed by Vsevolod Vlasov.
2327 Make sure the InspectorFileSystemAgent.cpp include the File.h by including explicitly.
2329 No new tests. Covered by existing tests.
2331 * inspector/InspectorFileSystemAgent.cpp: Include File.h
2333 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org>
2335 Web Inspector: [Regression] Stale revisions should be removed on navigation.
2336 https://bugs.webkit.org/show_bug.cgi?id=91080
2338 Reviewed by Pavel Feldman.
2340 Moved all the code responsible for script mapping resetting to Workspace.
2341 Stale revisions are removed in Workspace._reset now.
2343 * inspector/front-end/ScriptSnippetModel.js:
2344 (WebInspector.ScriptSnippetModel):
2345 * inspector/front-end/StylesPanel.js:
2346 (WebInspector.StylesUISourceCodeProvider):
2347 (WebInspector.StylesUISourceCodeProvider.prototype._populate):
2348 (WebInspector.StylesUISourceCodeProvider.prototype.reset):
2349 * inspector/front-end/UISourceCode.js:
2350 (WebInspector.UISourceCode.prototype._restoreRevisionHistory):
2351 * inspector/front-end/Workspace.js:
2352 (WebInspector.Workspace):
2353 (WebInspector.Workspace.prototype._reset):
2355 2012-07-12 Andreas Kling <kling@webkit.org>
2357 Make ElementAttributeData a variable-sized object to reduce memory use.
2358 <http://webkit.org/b/88240>
2360 Reviewed by Antti "Obi-Wan" Koivisto.
2362 Take advantage of the fact that we know at ElementAttributeData construction time how many attributes
2363 it needs to accomodate and allocate exactly as much space as needed instead of using a Vector.
2364 For elements that never have their attribute list mutated (the vast majority), this saves a lot of
2365 memory and removes the indirection to Vector<Attribute>'s heap-allocated storage.
2367 Introduced a mutability flag to ElementAttributeData and sprinkled assertions all over to make sure
2368 that nothing tries to mutate an element with a raw attribute array.
2370 When an Element's attribute(s) are mutated, we reconstruct the ElementAttributeData, this time using
2371 a Vector as backing instead. This is triggered when calling Element::mutableAttributeData().
2373 This reduces memory consumption by 3.2MB when viewing the full HTML5 spec at <http://whatwg.org/c/>.
2374 That is a ~35% reduction in DOM attribute memory use.
2376 Furthermore, that page ends up promoting 27% of the elements to mutable attribute storage due to dynamic
2377 adding of "class" attributes. For more static pages, savings are even greater.
2379 Also did away with ElementAttributeData::removeAttribute(name) and do separate index lookup where
2380 needed. Not a big deal but avoids double lookup of attributes when removing them.
2382 * css/PropertySetCSSStyleDeclaration.cpp:
2383 (WebCore::InlineCSSStyleDeclaration::ensureMutablePropertySet):
2385 Call ensureInlineStyle() on the element so we know we have a StylePropertySet to work with.
2386 May cause the creation (and replacement) of a new underlying StylePropertySet on the Element's
2389 * css/StylePropertySet.cpp:
2390 (WebCore::StylePropertySet::adoptCSSOMWrapperFrom):
2392 Added. Allows switching the underlying StylePropertySet object while retaining CSSOM wrapper
2393 identity (web facing behavior.)
2396 (WebCore::Element::detachAttribute):
2397 (WebCore::Element::removeAttribute):
2398 (WebCore::Element::attributes):
2399 (WebCore::Element::setAttributeInternal):
2400 (WebCore::Element::parserSetAttributes):
2401 (WebCore::Element::hasEquivalentAttributes):
2402 (WebCore::Element::setAttributeNode):
2403 (WebCore::Element::removeAttributeNode):
2404 (WebCore::Element::getAttributeNode):
2405 (WebCore::Element::getAttributeNodeNS):
2406 (WebCore::Element::hasAttribute):
2407 (WebCore::Element::hasAttributeNS):
2408 (WebCore::Element::normalizeAttributes):
2409 (WebCore::Element::cloneAttributesFromElement):
2410 (WebCore::Element::createMutableAttributeData):
2412 (WebCore::Element::attributeData):
2414 (WebCore::Element::updatedAttributeData):
2415 (WebCore::Element::ensureAttributeData):
2416 (WebCore::Element::ensureUpdatedAttributeData):
2417 (WebCore::Element::mutableAttributeData):
2419 * dom/ElementAttributeData.cpp:
2420 (WebCore::ElementAttributeData::createImmutable):
2422 (WebCore::ElementAttributeData::ElementAttributeData):
2423 (WebCore::ElementAttributeData::~ElementAttributeData):
2424 (WebCore::ElementAttributeData::attrIfExists):
2425 (WebCore::ElementAttributeData::ensureAttr):
2426 (WebCore::ElementAttributeData::setAttr):
2427 (WebCore::ElementAttributeData::removeAttr):
2428 (WebCore::ElementAttributeData::ensureInlineStyle):
2429 (WebCore::ElementAttributeData::ensureMutableInlineStyle):
2430 (WebCore::ElementAttributeData::destroyInlineStyle):
2431 (WebCore::ElementAttributeData::addAttribute):
2432 (WebCore::ElementAttributeData::removeAttribute):
2433 (WebCore::ElementAttributeData::isEquivalent):
2434 (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
2435 (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
2436 (WebCore::ElementAttributeData::cloneDataFrom):
2437 (WebCore::ElementAttributeData::clearAttributes):
2438 (WebCore::ElementAttributeData::replaceAttribute):
2439 (WebCore::ElementAttributeData::getAttributeNode):
2440 * dom/ElementAttributeData.h:
2441 (WebCore::ElementAttributeData::create):
2442 (ElementAttributeData):
2443 (WebCore::ElementAttributeData::setClass):
2444 (WebCore::ElementAttributeData::setIdForStyleResolution):
2445 (WebCore::ElementAttributeData::inlineStyle):
2446 (WebCore::ElementAttributeData::setAttributeStyle):
2447 (WebCore::ElementAttributeData::reportMemoryUsage):
2448 (WebCore::ElementAttributeData::isMutable):
2449 (WebCore::ElementAttributeData::makeMutable):
2450 (WebCore::ElementAttributeData::length):
2452 (WebCore::ElementAttributeData::isEmpty):
2453 (WebCore::ElementAttributeData::array):
2454 (WebCore::ElementAttributeData::removeAttribute):
2455 (WebCore::ElementAttributeData::getAttributeItem):
2456 (WebCore::ElementAttributeData::getAttributeItemIndex):
2457 (WebCore::ElementAttributeData::attributeItem):
2458 * dom/StyledElement.cpp:
2459 (WebCore::StyledElement::style):
2460 (WebCore::StyledElement::classAttributeChanged):
2461 (WebCore::StyledElement::setInlineStyleProperty):
2462 (WebCore::StyledElement::removeInlineStyleProperty):
2463 (WebCore::StyledElement::addSubresourceAttributeURLs):
2464 * dom/StyledElement.h:
2465 (WebCore::StyledElement::ensureInlineStyle):
2466 * html/parser/HTMLConstructionSite.cpp:
2467 (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
2468 * xml/parser/XMLDocumentParserQt.cpp:
2469 (WebCore::XMLDocumentParser::XMLDocumentParser):
2471 2012-07-12 Florin Malita <fmalita@chromium.org>
2473 Incorrect handling of chained pending resources in SVGUseElement
2474 https://bugs.webkit.org/show_bug.cgi?id=89686
2476 Reviewed by Nikolas Zimmermann.
2478 Currently SVGUseElement builds the shadow tree when the target first
2479 becomes available. This is normally OK, but if the target itself (or
2480 one of its children) is a <use> element with pending resources, then
2481 the shadow expansion only captures the current state of the tree and
2482 never gets updated when the pending resource becomes available.
2484 In order to support arbitrary <use>-on-<use> constructs, this patch
2485 tracks nested <use> dependencies and rebuilds the dependent trees
2486 whenever the target gets updated.
2489 Tests: svg/custom/use-nested-expected.svg
2490 svg/custom/use-nested.svg
2492 * svg/SVGElement.cpp:
2493 (WebCore::SVGElement::removedFrom): removedFrom needs to be called up the inheritance chain
2494 before invoking removeAllElementReferencesForTarget. Otherwise we could end up finding the
2495 element being removed as a valid target in SVGUseElement::buildInstanceTree because its
2496 InDocument flag is not cleared yet.
2497 * svg/SVGUseElement.cpp:
2498 (WebCore::SVGUseElement::~SVGUseElement):
2499 (WebCore::SVGUseElement::clearResourceReferences):
2500 (WebCore::SVGUseElement::buildPendingResource):
2501 (WebCore::SVGUseElement::buildShadowAndInstanceTree):
2502 (WebCore::SVGUseElement::buildInstanceTree):
2503 * svg/SVGUseElement.h:
2505 Track <use> -> <use> dependencies using SVGDocumentExtensions'
2506 m_elementDependencies framework and ensure dependent trees are rebuilt
2507 when the target itself gets rebuilt.
2509 2012-07-12 MORITA Hajime <morrita@google.com>
2511 Typo: ParentTranversalDetails should be ParentTraversalDetails
2512 https://bugs.webkit.org/show_bug.cgi?id=91059
2514 Reviewed by Andreas Kling.
2516 Did a bare rename from ParentTranversalDetails to ParentTraversalDetails
2518 No new tests, just a rename.
2520 * dom/ComposedShadowTreeWalker.cpp:
2521 (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didTraverseInsertionPoint):
2522 (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didTraverseShadowRoot):
2523 (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didFindNode):
2524 (WebCore::ComposedShadowTreeWalker::findParent):
2525 (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents):
2526 (WebCore::ComposedShadowTreeWalker::traverseParent):
2527 (WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree):
2528 (WebCore::ComposedShadowTreeWalker::traverseParentBackToYoungerShadowRootOrHost):
2529 * dom/ComposedShadowTreeWalker.h:
2530 (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::ParentTraversalDetails):
2531 (ComposedShadowTreeWalker):
2532 * dom/NodeRenderingContext.h:
2533 (NodeRenderingContext):
2535 2012-07-11 Antti Koivisto <antti@apple.com>
2537 Failure to dispatch didFinishLoadForFrame if font load fails synchronously
2538 https://bugs.webkit.org/show_bug.cgi?id=91018
2540 Reviewed by Enrica Casucci.
2542 New font loads may be triggered by layout after the document load is complete but before we have dispatched
2543 didFinishLoading for the frame. If the load fails synchronously we might fail to ever invoke
2544 FrameLoader::checkLoadComplete and so fail to dispatch didFinishLoading.
2546 Make sure this doesn't happen by calling FrameLoader::checkLoadComplete explicitly after triggering font loads.
2548 * css/CSSFontSelector.cpp:
2549 (WebCore::CSSFontSelector::beginLoadTimerFired):
2551 2012-07-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2553 Register protocol handler files should be in Modules/protocolhandler
2554 https://bugs.webkit.org/show_bug.cgi?id=90766
2556 Reviewed by Hajime Morita.
2558 The register protocol handler files are now self-contained. This patch is moved to the Modules.
2560 No new tests. Covered by existing tests.
2564 * GNUmakefile.list.am:
2565 * Modules/protocolhandler/NavigatorRegisterProtocolHandler.cpp: Renamed from Source/WebCore/page/NavigatorRegisterProtocolHandler.cpp.
2567 (WebCore::initProtocolHandlerWhitelist):
2568 (WebCore::verifyCustomHandlerURL):
2569 (WebCore::isProtocolWhitelisted):
2570 (WebCore::verifyProtocolHandlerScheme):
2571 (WebCore::NavigatorRegisterProtocolHandler::NavigatorRegisterProtocolHandler):
2572 (WebCore::NavigatorRegisterProtocolHandler::~NavigatorRegisterProtocolHandler):
2573 (WebCore::NavigatorRegisterProtocolHandler::registerProtocolHandler):
2574 (WebCore::customHandlersStateString):
2575 (WebCore::NavigatorRegisterProtocolHandler::isProtocolHandlerRegistered):
2576 (WebCore::NavigatorRegisterProtocolHandler::unregisterProtocolHandler):
2577 * Modules/protocolhandler/NavigatorRegisterProtocolHandler.h: Renamed from Source/WebCore/page/NavigatorRegisterProtocolHandler.h.
2579 (NavigatorRegisterProtocolHandler):
2580 * Modules/protocolhandler/NavigatorRegisterProtocolHandler.idl: Renamed from Source/WebCore/page/NavigatorRegisterProtocolHandler.idl.
2582 * WebCore.gyp/WebCore.gyp:
2585 * WebCore.vcproj/WebCore.vcproj:
2586 * WebCore.vcproj/WebCoreCommon.vsprops:
2587 * WebCore.vcproj/copyForwardingHeaders.cmd:
2588 * WebCore.xcodeproj/project.pbxproj:
2590 2012-07-12 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
2592 [BlackBerry] Cannot use digest proxy auth and NTLM auth at the same time
2593 https://bugs.webkit.org/show_bug.cgi?id=91054
2595 Reviewed by George Staikos.
2597 Added an interface function syncProxyCredential() in class
2598 PageClientBlackBerry, which is responsible to notify WebPageClient
2599 to synchronize proxy credential to the chrome process.
2601 Internally reviewed by Jason Liu <jason.liu@torchmobile.com.cn>
2603 No new tests since there's no functional change.
2605 * platform/blackberry/PageClientBlackBerry.h:
2606 * platform/network/blackberry/NetworkJob.cpp:
2607 (WebCore::NetworkJob::storeCredentials): Remember the accepted proxy
2608 credential and notify webpage client to synchronize it.
2610 2012-07-12 Xingnan Wang <xingnan.wang@intel.com>
2612 [IndexedDB] upperOpen set to true in lowerBound()/lowerOpen set to true in upperBound()
2613 https://bugs.webkit.org/show_bug.cgi?id=90867
2615 Reviewed by Tony Chang.
2617 In the latest W3C spec upperOpen/lowerOpen are set to true in lowerBound()/upperBound(), which
2618 we should keep aligned with.
2620 No new tests - updated storage/indexeddb/keyrange.html to match new behavior.
2622 * Modules/indexeddb/IDBKeyRange.cpp:
2623 (WebCore::IDBKeyRange::lowerBound):
2624 (WebCore::IDBKeyRange::upperBound):
2626 2012-07-12 MORITA Hajime <morrita@google.com>
2628 [Shadow DOM] <video> with <shadow> crashes
2629 https://bugs.webkit.org/show_bug.cgi?id=91055
2631 Reviewed by Kent Tamura.
2633 This is similar to Bug 90480, where an undesired renderer is created by
2634 locating an insertion point on the shadow boundary.
2636 This change adds a guard for such case by cheking whether the
2637 source node of each to-be-created renderer comes from the UA shadow
2638 tree, which is allowed to have a renderer.
2640 Test: fast/dom/shadow/insertion-point-video-crash.html
2642 * html/HTMLMediaElement.cpp:
2643 (WebCore::HTMLMediaElement::childShouldCreateRenderer): Added a check.
2644 (WebCore::HTMLMediaElement::mediaControls): Added const.
2645 (WebCore::HTMLMediaElement::hasMediaControls): Added const.
2646 * html/HTMLMediaElement.h:
2649 2012-07-12 Yoshifumi Inoue <yosin@chromium.org>
2651 REGRESSION(r122184): LocaleMac::currentLocale should use current locale rather than newly create locale object.
2652 https://bugs.webkit.org/show_bug.cgi?id=91057
2654 Reviewed by Kent Tamura.
2656 This patch changes NSLocale object of LocaleMac::m_locale variable to
2657 current NSLocale object rather than newly created NSLocale object from
2660 No new tests. We don't have way to change system preferences from
2661 test scripts and restoring them. To test this patch, we need to do so.
2663 * platform/text/mac/LocaleMac.h:
2664 (LocaleMac): Added a constructor which takes NSLocale object.
2665 * platform/text/mac/LocaleMac.mm:
2666 (WebCore::LocaleMac::LocaleMac): Added a constructor which takes NSLocale object.
2667 (WebCore::LocaleMac::currentLocale): Changed to construct LocaleMac object from NSLocale object rather than locale identifier.
2669 2012-07-11 Carlos Garcia Campos <cgarcia@igalia.com>
2671 [GTK] Add webkit_cookie_manager_set_persistent_storage() to WebKit2 GTK+ API
2672 https://bugs.webkit.org/show_bug.cgi?id=83016
2674 Reviewed by Martin Robinson.
2676 * platform/network/soup/CookieStorageSoup.cpp:
2677 (WebCore::soupCookiesChanged): Do not notify about changes in
2678 other cookie jars than the current one.
2680 2012-07-12 Philip Rogers <pdr@google.com>
2682 Refactor RenderSVGShape bounding box code
2683 https://bugs.webkit.org/show_bug.cgi?id=90655
2685 Reviewed by Nikolas Zimmermann.
2687 RenderSVGShape::objectBoundingBox worked differently than RenderSVGShape::strokeBoundingBox by
2688 not caching the object bounding box and instead computing it on each call. For consistency and
2689 performance objectBoundingBox has been refactored to return a cached value.
2691 createShape has been renamed updateShapeFromElement for understandability. updateShapeFromElement
2692 now updates the internal state of the shape (bounding boxes, etc) from the associated element.
2693 RenderSVGShape::inflateWithStrokeAndMarkerBounds has been merged into
2694 RenderSVGShape::calculateStrokeBoundingBox which is called from updateShapeFromElement.
2696 After this change all bounding box computation is now handled in updateShapeFromElement. Because
2697 subclasses override updateShapeFromElement it will be easy for them to have custom bounding box
2698 code there (as will happen for RenderSVGPath in a followup patch).
2700 strokeBoundingBox and objectBoundingBox are now able to return their cached values immediately
2701 in RenderSVGRect and RenderSVGEllipse instead of checking their fallback state on each call.
2703 Additionally, to save space RenderSVGEllipse and RenderSVGRect now use the m_fillBoundingBox and
2704 m_strokeBoundingBox of RenderSVGShape instead of having their own.
2706 This patch also removes setStrokeAndMarkerBoundingBox that was previously dead code.
2708 No new tests, just a refactoring.
2710 * rendering/svg/RenderSVGEllipse.cpp:
2711 (WebCore::RenderSVGEllipse::updateShapeFromElement):
2713 (WebCore::RenderSVGEllipse::fillShape):
2714 (WebCore::RenderSVGEllipse::strokeShape):
2715 (WebCore::RenderSVGEllipse::shapeDependentStrokeContains):
2716 * rendering/svg/RenderSVGEllipse.h:
2718 (WebCore::RenderSVGEllipse::isEmpty):
2719 * rendering/svg/RenderSVGRect.cpp:
2720 (WebCore::RenderSVGRect::updateShapeFromElement):
2722 (WebCore::RenderSVGRect::fillShape):
2723 (WebCore::RenderSVGRect::strokeShape):
2724 (WebCore::RenderSVGRect::shapeDependentStrokeContains):
2725 (WebCore::RenderSVGRect::shapeDependentFillContains):
2726 * rendering/svg/RenderSVGRect.h:
2728 (WebCore::RenderSVGRect::isEmpty):
2729 * rendering/svg/RenderSVGShape.cpp:
2730 (WebCore::RenderSVGShape::updateShapeFromElement):
2732 (WebCore::RenderSVGShape::layout):
2733 (WebCore::RenderSVGShape::calculateObjectBoundingBox):
2734 (WebCore::RenderSVGShape::calculateStrokeBoundingBox):
2735 (WebCore::RenderSVGShape::updateRepaintBoundingBox):
2736 * rendering/svg/RenderSVGShape.h:
2738 (WebCore::RenderSVGShape::objectBoundingBox):
2739 (WebCore::RenderSVGShape::strokeBoundingBox):
2741 2012-07-12 Kent Tamura <tkent@chromium.org>
2743 Do not save the form state signature if nothing is saved
2744 https://bugs.webkit.org/show_bug.cgi?id=91050
2746 Reviewed by Hajime Morita.
2748 This change will reduce the size of HistoyItem.
2750 Test: fast/forms/state-restore-empty-state.html
2752 * html/FormController.cpp:
2753 (WebCore::FormController::formElementsState):
2754 If stateVector has only the signature string, clear it.
2756 2012-07-11 Mark Rowe <mrowe@apple.com>
2758 <http://webkit.org/b/91051> Fix the Qt Mac build after r122400.
2760 Qt on Mac builds with a deployment target of OS X 10.5. However, it was not been setting
2761 BUILDING_ON_LEOPARD / TARGETING_LEOPARD and thus was falling down code paths in DisplaySleepDisabler.cpp
2762 that were specific to Snow Leopard and newer. After the removal of BUILDING_ON_LEOPARD
2763 and TARGETING_LEOPARD it ended up falling down the correct Leopard-compatible code path,
2764 which revealed that the code made assumptions about which headers had already been included.
2766 * platform/mac/DisplaySleepDisabler.cpp: Include CoreServices/CoreServices.h to pull in
2767 a declaration of UpdateSystemActivity when targeting Leopard.
2769 2012-07-11 Matt Falkenhagen <falken@chromium.org>
2771 Add dialog element feature toggle to InternalSettings
2772 https://bugs.webkit.org/show_bug.cgi?id=90934
2774 Reviewed by Hajime Morita.
2776 This enables layout tests to be written for dialog although the feature is disabled by default.
2778 Tests: fast/dom/HTMLDialogElement/dialog-disabled.html
2779 fast/dom/HTMLDialogElement/dialog-enabled.html
2781 * WebCore.exp.in: Added newly exported symbol.
2782 * testing/InternalSettings.cpp:
2783 (WebCore::InternalSettings::Backup::Backup): Backup dialog feature flag.
2784 (WebCore::InternalSettings::Backup::restoreTo): Restore dialog feature flag.
2785 (WebCore::InternalSettings::setDialogElementEnabled): Added.
2787 * testing/InternalSettings.h: Added support for dialog.
2790 * testing/InternalSettings.idl: Added support for dialog.
2792 2012-07-11 Kent Tamura <tkent@chromium.org>
2794 Accessing width or height of a detached image input element causes crash
2795 https://bugs.webkit.org/show_bug.cgi?id=90885
2797 Reviewed by Kentaro Hara.
2799 Test: fast/forms/image/width-and-height-of-detached-input.html
2801 * html/ImageInputType.cpp:
2802 (WebCore::ImageInputType::height): Add null check for m_imageLoader.
2803 (WebCore::ImageInputType::width): ditto.
2805 2012-07-11 Kent Tamura <tkent@chromium.org>
2807 Do not save state of stateless form controls
2808 https://bugs.webkit.org/show_bug.cgi?id=90964
2810 Reviewed by Hajime Morita.
2812 By Bug 89409, we started to store unmodified form control
2813 state. However we don't need to make such state for the following
2821 Test: fast/forms/state-restore-skip-stateless.html
2823 * html/BaseButtonInputType.cpp:
2824 (WebCore::BaseButtonInputType::shouldSaveAndRestoreFormControlState):
2825 Added. Disable saving state for submit, reset, and button types.
2826 * html/BaseButtonInputType.h:
2827 (BaseButtonInputType): Add shouldSaveAndRestoreFormControlState.
2828 * html/HTMLFormControlElementWithState.h:
2829 (HTMLFormControlElementWithState): Make shouldSaveAndRestoreFormControlState virtual.
2830 * html/HTMLInputElement.cpp:
2831 (WebCore::HTMLInputElement::shouldSaveAndRestoreFormControlState):
2832 Added. Checks InputType::shouldSaveAndRestoreFormControlState first.
2833 * html/HTMLInputElement.h:
2834 (HTMLInputElement): Override shouldSaveAndRestoreFormControlState.
2835 * html/HTMLKeygenElement.cpp:
2836 (WebCore::HTMLKeygenElement::shouldSaveAndRestoreFormControlState)
2837 Added. Disable saving state for <keygen>.:
2838 * html/HTMLKeygenElement.h: Override shouldSaveAndRestoreFormControlState.
2839 * html/InputType.cpp:
2840 (WebCore::InputType::shouldSaveAndRestoreFormControlState):
2841 Added. Enable saving state for all types by default.
2843 (InputType): Add shouldSaveAndRestoreFormControlState.
2844 * html/PasswordInputType.cpp:
2845 (WebCore::PasswordInputType::shouldSaveAndRestoreFormControlState):
2846 Added. Disabled saving state.
2847 (WebCore::PasswordInputType::saveFormControlState):
2848 Because shouldSaveAndRestoreFormControlState() returns false,
2849 saveFormControlState should be never called.
2850 * html/PasswordInputType.h:
2851 (PasswordInputType): Override shouldSaveAndRestoreFormControlState.
2853 2012-07-11 No'am Rosenthal <noam.rosenthal@nokia.com>
2855 Compilation error with GLES2 when using gl2ext.h from ANGLE.
2856 https://bugs.webkit.org/show_bug.cgi?id=91030
2858 Reviewed by Kenneth Russell.
2860 gl2ext.h defines PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG and not
2861 PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC. This is a bug in the original Khronos header,
2862 but we should work around it until fixed headers are integrated.
2865 * platform/graphics/opengl/Extensions3DOpenGLES.h:
2866 (Extensions3DOpenGLES):
2867 Removed the "PROC" suffix to work around the header bug.
2869 2012-07-11 Mark Rowe <mrowe@apple.com>
2871 Attempt to fix the Chromium Mac build after r122400.
2873 * platform/text/cf/HyphenationCF.cpp: Ensure that Chromium only compiles the body of this file if
2874 building for a new enough version of OS X.
2876 2012-07-11 Kent Tamura <tkent@chromium.org>
2878 [Mac] Sort project.pbxproj
2880 * WebCore.xcodeproj/project.pbxproj: Apply Tools/Scripts/sort-Xcode-project-file
2882 2012-07-11 Dan Bernstein <mitz@apple.com>
2884 When a table row height grows because of pagination, not all cells’ heights are adjusted
2885 https://bugs.webkit.org/show_bug.cgi?id=91043
2887 Reviewed by Sam Weinig.
2889 The fix for in bug <http://webkit.org/b/83595> in <http://trac.webkit.org/r113738> made table
2890 rows grow as necessary to fit cells that grow as a result of pagination. But it had two bad
2891 side effects: earlier cells on the row would not grow by the same amount, and later cells on
2892 the row would factor the existing growth into their intrinsic padding.
2894 Test: fast/multicol/table-row-height-increase.html
2896 * rendering/RenderTableSection.cpp:
2897 (WebCore::RenderTableSection::layoutRows): Now when a cell becomes taller than the row height,
2898 the additional height needed is recorded, and the cell is shrunk back to row height. Then
2899 after finishing the row, all cells occurring on the row (including cells spanning it but not
2900 starting on it) are grown by the same amount.
2902 2012-07-11 Mark Rowe <mrowe@apple.com>
2904 <http://webkit.org/b/91024> Build against the latest SDK when targeting older OS X versions.
2906 Reviewed by Dan Bernstein.
2908 The deployment target is already set to the version that we're targeting, and it's that setting
2909 which determines which functionality from the SDK is available to us.
2911 * Configurations/Base.xcconfig:
2913 2012-07-11 Mark Rowe <mrowe@apple.com>
2915 Switch a few cases that care about the SDK over to checking __MAC_OS_X_VERSION_MAX_ALLOWED so that things build.
2917 Part of <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
2919 Reviewed by Filip Pizlo.
2921 * platform/graphics/cg/GraphicsContextCG.cpp: The SDK we're building against determines whether the constant is available.
2922 * platform/mac/EmptyProtocolDefinitions.h: The SDK we're building against determines whether the protocols are declared.
2923 * platform/mac/NSScrollerImpDetails.h: The SDK we're building against determines whether the constants and method are
2925 * platform/mac/SharedTimerMac.mm: The SDK we're building against determines whether the function has already been declared.
2927 2012-07-11 Mark Rowe <mrowe@apple.com>
2929 <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
2931 This removal was handled by a script that translates the relevant macros in to the equivalent checks
2932 using the system availability macros.
2934 Reviewed by Filip Pizlo.
2937 * accessibility/AccessibilityList.h:
2938 * accessibility/AccessibilityTable.h:
2939 * accessibility/mac/AXObjectCacheMac.mm:
2940 * editing/mac/EditorMac.mm:
2941 * loader/MainResourceLoader.cpp:
2942 * loader/MainResourceLoader.h:
2943 * page/AlternativeTextClient.h:
2944 * page/ContextMenuController.cpp:
2945 * page/mac/SettingsMac.mm:
2946 * platform/LocalizedStrings.cpp:
2947 * platform/MemoryPressureHandler.cpp:
2948 * platform/audio/mac/AudioBusMac.mm:
2949 * platform/graphics/Gradient.h:
2950 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2951 * platform/graphics/ca/GraphicsLayerCA.cpp:
2952 * platform/graphics/ca/PlatformCALayer.h:
2953 * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2954 * platform/graphics/ca/mac/TileCache.mm:
2955 * platform/graphics/cg/GraphicsContextCG.cpp:
2956 * platform/graphics/cg/ImageBufferCG.cpp:
2957 * platform/graphics/cg/ImageBufferDataCG.cpp:
2958 * platform/graphics/cg/ImageBufferDataCG.h:
2959 * platform/graphics/cg/ImageCG.cpp:
2960 * platform/graphics/cg/ImageSourceCG.cpp:
2961 * platform/graphics/cg/PathCG.cpp:
2962 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2963 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2964 * platform/graphics/mac/ComplexTextController.cpp:
2965 * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2966 * platform/graphics/mac/FontCacheMac.mm:
2967 * platform/graphics/mac/FontCustomPlatformData.cpp:
2968 * platform/graphics/mac/FontMac.mm:
2969 * platform/graphics/mac/GraphicsContextMac.mm:
2970 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2971 * platform/graphics/mac/SimpleFontDataMac.mm:
2972 * platform/graphics/mac/WebLayer.h:
2973 * platform/graphics/mac/WebLayer.mm:
2974 * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2975 * platform/mac/CursorMac.mm:
2976 * platform/mac/DisplaySleepDisabler.cpp:
2977 * platform/mac/DisplaySleepDisabler.h:
2978 * platform/mac/EmptyProtocolDefinitions.h:
2979 * platform/mac/HTMLConverter.h:
2980 * platform/mac/HTMLConverter.mm:
2981 * platform/mac/MemoryPressureHandlerMac.mm:
2982 * platform/mac/NSScrollerImpDetails.h:
2983 * platform/mac/PlatformEventFactoryMac.mm:
2984 * platform/mac/PopupMenuMac.mm:
2985 * platform/mac/ScrollAnimatorMac.mm:
2986 * platform/mac/ScrollElasticityController.mm:
2987 * platform/mac/SharedTimerMac.mm:
2988 * platform/mac/SuddenTermination.mm:
2989 * platform/mac/WebCoreFullScreenWindow.mm:
2990 * platform/mac/WebCoreNSCellExtras.h:
2991 * platform/mac/WebCoreSystemInterface.h:
2992 * platform/mac/WebCoreSystemInterface.mm:
2993 * platform/mac/WebFontCache.mm:
2994 * platform/mac/WebVideoFullscreenController.mm:
2995 * platform/mac/WebVideoFullscreenHUDWindowController.mm:
2996 * platform/network/Credential.h:
2997 * platform/network/ResourceHandle.h:
2998 * platform/network/cf/DNSCFNet.cpp:
2999 * platform/network/cf/ProxyServerCFNet.cpp:
3000 * platform/network/cf/ResourceRequest.h:
3001 * platform/network/cf/ResourceRequestCFNet.cpp:
3002 * platform/network/cf/SocketStreamHandleCFNet.cpp:
3003 * platform/network/mac/AuthenticationMac.mm:
3004 * platform/network/mac/CookieStorageMac.mm:
3005 * platform/network/mac/ResourceHandleMac.mm:
3006 * platform/network/mac/ResourceRequestMac.mm:
3007 * platform/network/mac/WebCoreURLResponse.mm:
3008 * platform/text/TextChecking.h:
3009 * platform/text/cf/HyphenationCF.cpp:
3010 * platform/text/mac/HyphenationMac.mm:
3011 * rendering/RenderLayerBacking.cpp:
3012 * rendering/RenderLayerCompositor.cpp:
3013 * rendering/RenderThemeMac.mm:
3015 2012-07-11 Robert Kroeger <rjkroege@chromium.org>
3017 Suppress horizontal conversion of PlatformWheelEvents when hasPreciseScrollingDeltas is true
3018 https://bugs.webkit.org/show_bug.cgi?id=89580
3020 WebKit GTK and Chromium Linux force vertical wheel events to
3021 scroll horizontally when over horizontal scroll bars. This is
3022 undesirable for touchpad scrolling with
3023 hasPreciseScrollingDeltas() == true. Modified shouldTurnVerticalTicksIntoHorizontal
3024 to not perform this conversion for PlatformWheelEvents with preciseScrollingDeltas.
3026 Reviewed by Adam Barth.
3028 Tests: fast/events/touch/gesture/touch-gesture-scroll-sideways.html
3030 * page/EventHandler.cpp:
3031 (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
3032 (WebCore::EventHandler::handleWheelEvent):
3033 * page/EventHandler.h:
3035 * page/chromium/EventHandlerChromium.cpp:
3036 (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
3037 * page/gtk/EventHandlerGtk.cpp:
3038 (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
3040 2012-07-11 Hayato Ito <hayato@chromium.org>
3042 Unreviewed gardening.
3043 Build fix for r122373.
3045 * platform/chromium/support/WebCompositorSharedQuadState.cpp:
3046 (WebKit::WebCompositorSharedQuadState::WebCompositorSharedQuadState):
3048 2012-07-11 Shinya Kawanaka <shinyak@chromium.org>
3050 SVGUseElement should not use Element::ensureShadowRoot().
3051 https://bugs.webkit.org/show_bug.cgi?id=90938
3053 Reviewed by Hajime Morita.
3055 We would like to remove Element::ensureShadowRoot() because we would like to stabilize the lifecycle of Shadow DOM.
3056 This patch rewrites SVGUseElement::create() not to use Element::ensureShadowRoot(). Since our convention to create
3057 a shadow subtree is to create a method createShadowSubtree(), I obeyed it.
3059 No new tests. Simple refactoring.
3061 * svg/SVGUseElement.cpp:
3062 (WebCore::SVGUseElement::create):
3063 (WebCore::SVGUseElement::createShadowSubtree):
3065 * svg/SVGUseElement.h:
3068 2012-07-11 Alexandre Elias <aelias@google.com>
3070 [chromium] Move compositor quads to Platform/chromium/public
3071 https://bugs.webkit.org/show_bug.cgi?id=90582
3073 Reviewed by Adrienne Walker.
3075 This moves CCSharedQuadState, CCDrawQuad, and all but two CC*DrawQuad
3076 classes to the WebKit namespace, as a first step to pushing them
3077 across the process boundary for the ubercompositor.
3079 - The intent is to serialize the class hierarchy using the same
3080 mechanism as WebInputEvent. In order to do this, there are three
3081 requirements: pure POD data, a method returning size, and a packing
3084 - Private data members are fine with this kind of serializer, and a
3085 default constructor is not needed. Because of that, we can maintain
3086 the same encapsulation and convenient APIs (behind
3087 WEBKIT_IMPLEMENTATION) as the original classes. To ease the
3088 transition, the original WebCore headers still exist and typedef to
3091 - However, SharedQuadState will be serialized using the normal
3092 IPC_STRUCT_TRAITS macro, so I made its members public. A custom
3093 serializer (on quad lists) will maintain the pointers from quads to
3096 - I converted the Material casting mechanism to materialCast() methods
3097 living in the derived classes. That way, the WebCompositorQuad header
3098 doesn't need to know about all its derived classes.
3100 - Quad classes not yet transitioned can still be used in
3101 non-ubercompositor mode. CCRenderPassDrawQuad and CCYUVVideoDrawQuad
3102 are currently non-POD and I left them in their original files.
3104 This approach is the best I've found so far, since it preserves all
3105 WebCore-facing APIs and avoids unnecessary code duplication (new quad
3106 types or members can be added by modifying only one place). There
3107 also should not be an unreasonable amount of custom serializer code
3110 No new tests. (No-op refactoring.)
3113 * platform/chromium/support/WebCompositorQuad.cpp: Added.
3115 (WebKit::WebCompositorQuad::WebCompositorQuad):
3116 (WebKit::WebCompositorQuad::opaqueRect):
3117 (WebKit::WebCompositorQuad::setQuadVisibleRect):
3118 (WebKit::WebCompositorQuad::size):
3119 * platform/chromium/support/WebCompositorSharedQuadState.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCSharedQuadState.cpp.
3121 (WebKit::WebCompositorSharedQuadState::WebCompositorSharedQuadState):
3122 (WebKit::WebCompositorSharedQuadState::create):
3123 (WebKit::WebCompositorSharedQuadState::isLayerAxisAlignedIntRect):
3124 * platform/chromium/support/WebCompositorSolidColorQuad.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp.
3126 (WebKit::WebCompositorSolidColorQuad::create):
3127 (WebKit::WebCompositorSolidColorQuad::WebCompositorSolidColorQuad):
3128 (WebKit::WebCompositorSolidColorQuad::materialCast):
3129 * platform/chromium/support/WebCompositorTextureQuad.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCTextureDrawQuad.cpp.
3131 (WebKit::WebCompositorTextureQuad::create):
3132 (WebKit::WebCompositorTextureQuad::WebCompositorTextureQuad):
3133 (WebKit::WebCompositorTextureQuad::setNeedsBlending):
3134 (WebKit::WebCompositorTextureQuad::materialCast):
3135 * platform/graphics/chromium/LayerRendererChromium.cpp:
3136 (WebCore::LayerRendererChromium::drawQuad):
3137 * platform/graphics/chromium/LayerRendererChromium.h:
3138 * platform/graphics/chromium/cc/CCCheckerboardDrawQuad.cpp:
3139 (WebCore::CCCheckerboardDrawQuad::create):
3140 (WebCore::CCCheckerboardDrawQuad::CCCheckerboardDrawQuad):
3141 (WebCore::CCCheckerboardDrawQuad::materialCast):
3143 * platform/graphics/chromium/cc/CCCheckerboardDrawQuad.h:
3144 (CCCheckerboardDrawQuad):
3145 * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp:
3146 (WebCore::CCDebugBorderDrawQuad::create):
3147 (WebCore::CCDebugBorderDrawQuad::CCDebugBorderDrawQuad):
3148 (WebCore::CCDebugBorderDrawQuad::materialCast):
3150 * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.h:
3151 (CCDebugBorderDrawQuad):
3152 * platform/graphics/chromium/cc/CCDrawQuad.cpp: Removed.
3153 * platform/graphics/chromium/cc/CCDrawQuad.h:
3155 * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.cpp:
3156 (WebCore::CCIOSurfaceDrawQuad::create):
3157 (WebCore::CCIOSurfaceDrawQuad::CCIOSurfaceDrawQuad):
3158 (WebCore::CCIOSurfaceDrawQuad::materialCast):
3160 * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.h:
3161 (CCIOSurfaceDrawQuad):
3162 * platform/graphics/chromium/cc/CCLayerImpl.h:
3164 * platform/graphics/chromium/cc/CCRenderPass.h:
3166 * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
3167 (WebCore::CCRenderPassDrawQuad::create):
3168 (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
3169 (WebCore::CCRenderPassDrawQuad::materialCast):
3171 * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
3172 (CCRenderPassDrawQuad):
3173 * platform/graphics/chromium/cc/CCRenderSurface.h:
3175 * platform/graphics/chromium/cc/CCSharedQuadState.h:
3177 * platform/graphics/chromium/cc/CCSolidColorDrawQuad.h:
3179 * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.cpp:
3180 (WebCore::CCStreamVideoDrawQuad::create):
3181 (WebCore::CCStreamVideoDrawQuad::CCStreamVideoDrawQuad):
3182 (WebCore::CCStreamVideoDrawQuad::materialCast):
3184 * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.h:
3185 (CCStreamVideoDrawQuad):
3186 * platform/graphics/chromium/cc/CCTextureDrawQuad.h:
3188 * platform/graphics/chromium/cc/CCTileDrawQuad.cpp:
3189 (WebCore::CCTileDrawQuad::create):
3190 (WebCore::CCTileDrawQuad::CCTileDrawQuad):
3191 (WebCore::CCTileDrawQuad::materialCast):
3193 * platform/graphics/chromium/cc/CCTileDrawQuad.h:
3195 * platform/graphics/chromium/cc/CCYUVVideoDrawQuad.cpp:
3196 (WebCore::CCYUVVideoDrawQuad::create):
3197 (WebCore::CCYUVVideoDrawQuad::CCYUVVideoDrawQuad):
3198 (WebCore::CCYUVVideoDrawQuad::materialCast):
3200 * platform/graphics/chromium/cc/CCYUVVideoDrawQuad.h:
3201 (CCYUVVideoDrawQuad):
3203 2012-07-11 Robert Kroeger <rjkroege@chromium.org>
3205 [chromium] [regression] Don't use ScrollByPrecisePixels on Chromium Mac.
3206 https://bugs.webkit.org/show_bug.cgi?id=91020
3208 Reviewed by Adam Barth.
3210 A change in https://bugs.webkit.org/show_bug.cgi?id=87535 to
3211 improve the operation of smooth scrolling incorrectly caused
3212 Chromium Mac to use the wrong scroll granularity on
3213 hasPreciseScrollingDeltas() == true wheelevent scrolls.
3214 Exclude the change on the Chromium Mac platform.
3216 * platform/ScrollAnimator.cpp:
3217 (WebCore::ScrollAnimator::handleWheelEvent): Adjusted #ifdef to exclude Chromium
3218 Mac from ScrollByPrecisePixels change.
3220 2012-07-11 Jia Pu <jpu@apple.com>
3222 On Mac, autocorrection sometimes fails to take place in Safari.
3223 https://bugs.webkit.org/show_bug.cgi?id=89982
3225 Reviewed by Ryosuke Niwa.
3227 We should check the value of shouldCheckForCorrection, not shouldShowCorrectionPanel, to determine if we should
3228 early return in markAndReplaceFor(). Also, since we don't want autocorrection to happen when we only change selection,
3229 not the content, so we shouldn't set TextCheckingTypeCorrection flag in markMisspellingsAndBadGrammar() as this function
3230 is triggered only by selection change.
3232 * editing/Editor.cpp:
3233 (WebCore::Editor::markAndReplaceFor):
3234 (WebCore::Editor::markMisspellingsAndBadGrammar):
3236 2012-07-11 Sheriff Bot <webkit.review.bot@gmail.com>
3238 Unreviewed, rolling out r122361.
3239 http://trac.webkit.org/changeset/122361
3240 https://bugs.webkit.org/show_bug.cgi?id=91027
3242 Broke Windows build and fast/forms/state-restore-broken-
3243 state.html (Requested by rniwa on #webkit).
3245 * testing/Internals.idl:
3247 2012-07-10 Simon Fraser <simon.fraser@apple.com>
3249 Assertion ASSERTION FAILED: enclosingIntRect(rendererMappedResult) == enclosingIntRect(FloatQuad(result).boundingBox()) when compositing in paginated mode
3250 https://bugs.webkit.org/show_bug.cgi?id=90919
3252 Reviewed by Antti Koivisto.
3254 r121124 added a fast path for geometry mapping that goes via layers
3255 when possible. However, this broke paginated pages, which put
3256 the root (RenderView) layer into column mode, because it failed
3257 to check for columns on the ancestor layer.
3259 Rather than make a risky change to convertToLayerCoords(), add a local
3260 function canMapViaLayer(), which is like RenderLayer::canUseConvertToLayerCoords(),
3261 but doesn't check for compositing (compositing itself is not a reason
3262 to avoid convertToLayerCoords). Call canMapViaLayer() with the ancestorLayer
3263 to check whether the ancestor has columns, which fixes the bug.
3265 Test: compositing/columns/geometry-map-paginated-assert.html
3267 * rendering/RenderGeometryMap.cpp:
3268 (WebCore::canMapViaLayer):
3269 (WebCore::RenderGeometryMap::pushMappingsToAncestor):
3271 2012-07-11 Dana Jansens <danakj@chromium.org>
3273 [chromium] Rename layerRect to contentRect for rects that live in content space
3274 https://bugs.webkit.org/show_bug.cgi?id=90843
3276 Reviewed by Adrienne Walker.
3278 Dropped the layerTransform() from CCSharedQuadState, as nothing should be
3279 using it to draw with. RenderPasses need a weird drawTransform right now
3280 which was stored in layerTransform, so moved this to the RenderPass quad.
3282 No new tests. No change in behaviour.
3284 * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp:
3285 (WebCore::CanvasLayerTextureUpdater::paintContents):
3286 * platform/graphics/chromium/ContentLayerChromium.cpp:
3287 (WebCore::ContentLayerChromium::update):
3288 (WebCore::ContentLayerChromium::needMoreUpdates):
3289 * platform/graphics/chromium/ImageLayerChromium.cpp:
3290 (WebCore::ImageLayerChromium::update):
3291 * platform/graphics/chromium/LayerChromium.cpp:
3292 (WebCore::LayerChromium::visibleContentOpaqueRegion):
3293 * platform/graphics/chromium/LayerChromium.h:
3294 (WebCore::LayerChromium::visibleContentRect):
3295 (WebCore::LayerChromium::setVisibleContentRect):
3297 * platform/graphics/chromium/LayerRendererChromium.cpp:
3298 (WebCore::LayerRendererChromium::drawRenderPassQuad):
3299 (WebCore::LayerRendererChromium::drawTileQuad):
3300 (WebCore::LayerRendererChromium::drawYUVVideoQuad):
3301 (WebCore::LayerRendererChromium::drawStreamVideoQuad):
3302 (WebCore::LayerRendererChromium::drawIOSurfaceQuad):
3303 * platform/graphics/chromium/TiledLayerChromium.cpp:
3304 (WebCore::TiledLayerChromium::updateBounds):
3305 (WebCore::TiledLayerChromium::setNeedsDisplayRect):
3306 (WebCore::TiledLayerChromium::invalidateContentRect):
3307 (WebCore::TiledLayerChromium::updateTiles):
3308 (WebCore::TiledLayerChromium::setTexturePriorities):
3309 (WebCore::TiledLayerChromium::setTexturePrioritiesInRect):
3310 (WebCore::TiledLayerChromium::visibleContentOpaqueRegion):
3311 (WebCore::TiledLayerChromium::updateContentRect):
3312 (WebCore::TiledLayerChromium::needsIdlePaint):
3313 (WebCore::TiledLayerChromium::idlePaintRect):
3314 * platform/graphics/chromium/TiledLayerChromium.h:
3315 (TiledLayerChromium):
3316 * platform/graphics/chromium/cc/CCDrawQuad.h:
3317 (WebCore::CCDrawQuad::visibleContentRect):
3318 * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3319 (WebCore::CCLayerImpl::createSharedQuadState):
3320 (WebCore::CCLayerImpl::appendDebugBorderQuad):
3321 (WebCore::CCLayerImpl::visibleContentOpaqueRegion):
3322 * platform/graphics/chromium/cc/CCLayerImpl.h:
3323 (WebCore::CCLayerImpl::visibleContentRect):
3324 (WebCore::CCLayerImpl::setVisibleContentRect):
3326 * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
3327 (WebCore::CCLayerTilingData::contentRectToTileIndices):
3328 (WebCore::CCLayerTilingData::opaqueRegionInContentRect):
3329 (WebCore::CCLayerTilingData::setBounds):
3330 * platform/graphics/chromium/cc/CCLayerTilingData.h:
3331 (CCLayerTilingData):
3332 * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
3333 (WebCore::calculateVisibleContentRect):
3334 (WebCore::layerShouldBeSkipped):
3336 (WebCore::calculateVisibleAndScissorRectsInternal):
3337 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3338 (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
3339 * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
3340 (WebCore::addOcclusionBehindLayer):
3341 * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
3342 (WebCore::CCRenderPassDrawQuad::create):
3343 (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
3344 * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
3345 (CCRenderPassDrawQuad):
3346 (WebCore::CCRenderPassDrawQuad::drawTransform):
3347 * platform/graphics/chromium/cc/CCRenderSurface.cpp:
3348 (WebCore::CCRenderSurface::createSharedQuadState):
3349 (WebCore::CCRenderSurface::createReplicaSharedQuadState):
3350 (WebCore::CCRenderSurface::appendQuads):
3351 * platform/graphics/chromium/cc/CCSharedQuadState.cpp:
3352 (WebCore::CCSharedQuadState::create):
3353 (WebCore::CCSharedQuadState::CCSharedQuadState):
3354 (WebCore::CCSharedQuadState::isLayerAxisAlignedIntRect):
3355 * platform/graphics/chromium/cc/CCSharedQuadState.h:
3356 (CCSharedQuadState):
3357 (WebCore::CCSharedQuadState::visibleContentRect):
3358 * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3359 (WebCore::CCTiledLayerImpl::appendQuads):
3360 (WebCore::CCTiledLayerImpl::visibleContentOpaqueRegion):
3362 2012-07-11 Chris Fleizach <cfleizach@apple.com>
3364 ARIA spinbutton role incorrectly mapped to ProgressIndicatorRole
3365 https://bugs.webkit.org/show_bug.cgi?id=77298
3367 Reviewed by Anders Carlsson.
3369 * accessibility/AccessibilityObject.cpp:
3370 (WebCore::createARIARoleMap):
3372 2012-07-11 Huang Dongsung <luxtella@company100.net>
3374 BitmapImage::frameIsCompleteAtIndex() must return false if ImageDecoder is not initialized.
3375 https://bugs.webkit.org/show_bug.cgi?id=90757
3377 Reviewed by Simon Fraser.
3379 The current code fortunately has worked so far because only
3380 BitmapImage::startAnimation calls frameIsCompleteAtIndex, and startAnimation
3381 cannot call frameIsCompleteAtIndex if ImageDecoder is not yet initialized.
3382 startAnimation returns at the first line becase shouldAnimate() always return
3385 if (m_frameTimer || !shouldAnimate() || frameCount() <= 1)
3388 This change is needed because parallel image decoders call
3389 BitmapImage::frameIsCompleteAtIndex in other places too.
3391 No new tests, manually tested whether the caller exists or not that
3392 calls BitmapImage::frameIsCompleteAtIndex() before ImageDecoder is
3395 * platform/graphics/BitmapImage.cpp:
3396 (WebCore::BitmapImage::frameIsCompleteAtIndex):
3398 2012-07-11 Kevin Ollivier <kevino@theolliviers.com>
3400 [wx] Unreviewed build fix. Update code to use the new constant name.