1 2012-07-05 Robert Hogan <robert@webkit.org>
3 CSS 2.1 failure: vertical-align-boxes-001 fails
4 https://bugs.webkit.org/show_bug.cgi?id=90626
6 Reviewed by Eric Seidel.
8 Tests: css2.1/20110323/vertical-align-boxes-001.htm
10 A percentage value vertical-align is always a percentage of the actual line-height rather than
11 the margin box per http://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align: 'Percentages:
12 refer to the 'line-height' of the element itself'. Confusingly, RenderBox::lineheight() is a
13 shorthand into the dimensions of the margin box for replaced elements in the other vertical-align
14 cases, i.e. where it's the margin box that's relevant rather than the 'line-height'. So rather than patch RenderBox's
15 lineHeight() to somehow consider the percentage cases, just give percentage vertical-align the full computedLineHeight()
16 rather than lineHeight()'s margin box.
18 * rendering/RootInlineBox.cpp:
19 (WebCore::RootInlineBox::verticalPositionForBox):
21 2012-07-13 Ryosuke Niwa <rniwa@webkit.org>
23 Iterating backwards over HTMLCollection is O(n^2)
24 https://bugs.webkit.org/show_bug.cgi?id=91306
26 Reviewed by Anders Carlsson.
28 Fixed the bug by introducing itemBefore that iterates nodes backwards to complement itemAfter.
29 Unfortunately, some HTML collections such as HTMLFormCollection and HTMLTableRowsCollection have
30 its own itemAfter function and writing an equivalent itemBefore is somewhat tricky. For now,
31 added a new boolean flag indicating whether a given HTML collection supports itemBefore or not,
32 and left those HTML collections that override itemAfter alone.
34 This also paves our way to share more code between DynamicNodeList and HTMLCollection.
36 Test: perf/htmlcollection-backwards-iteration.html
38 * dom/DynamicNodeList.h:
39 (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): Takes ItemBeforeSupportType.
40 (WebCore::DynamicNodeListCacheBase::supportsItemBefore): Added.
41 (DynamicNodeListCacheBase):
42 (WebCore::DynamicNodeListCacheBase::setItemCache): Replaced a FIXME by an assertion now that
44 * html/HTMLAllCollection.cpp:
45 (WebCore::HTMLAllCollection::HTMLAllCollection): Supports itemBefore since it doesn't override
47 * html/HTMLCollection.cpp:
48 (WebCore::HTMLCollection::HTMLCollection):
49 (WebCore::HTMLCollection::create):
50 (WebCore::isAcceptableElement): Made it a static local function instead of a static member.
51 (WebCore::nextNode): Templatized.
52 (WebCore::itemBeforeOrAfter): Extracted from itemAfter and templatized.
53 (WebCore::HTMLCollection::itemBefore): Added.
54 (WebCore::HTMLCollection::itemAfter):
55 (WebCore::HTMLCollection::shouldSearchFromFirstItem): Added. Determines whether we should reset
56 the item cache to the first item. We obviously do if the cache is invalid. If the target offset
57 is after the cached offset, then we shouldn't go back regardless of availability of itemBefore.
58 Otherwise, we go back to the first item iff itemBefore is not available or the distance from
59 the cached offset to the target offset is greater than the target offset itself.
60 (WebCore::HTMLCollection::length):
61 (WebCore::HTMLCollection::item): Use the term "offset" to match the terminology elsewhere.
62 (WebCore::HTMLCollection::itemBeforeOrAfterCachedItem): Ditto. Also added the logic to iterate
63 nodes backwards using itemBefore. Once we're in this branch, we should always find a matching
64 item since the target offset was less than the cached offset, and offsets are non-negative.
65 If we had ever reached the end of the loop without finding an item, it indicates that the cache
66 has been invalid and we have some serious bug elsewhere.
67 * html/HTMLCollection.h:
68 (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
70 * html/HTMLOptionsCollection.cpp:
71 (WebCore::HTMLOptionsCollection::HTMLOptionsCollection): Supports itemBefore since it doesn't
73 * html/HTMLFormCollection.cpp:
74 (WebCore::HTMLFormCollection::HTMLFormCollection): Doesn't support itemBefore as it overrides
76 * html/HTMLNameCollection.cpp:
77 (WebCore::HTMLNameCollection::HTMLNameCollection): Ditto.
78 * html/HTMLPropertiesCollection.cpp:
79 (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
80 * html/HTMLTableRowsCollection.cpp:
81 (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
83 2012-07-13 Eric Penner <epenner@google.com>
85 [chromium] Add 'self-managed' option to CCPrioritizedTexture to enable render-surface and canvas use cases.
86 https://bugs.webkit.org/show_bug.cgi?id=91177
88 Reviewed by Adrienne Walker.
90 This makes the render-surface memory use case generic as 'self-managed' textures,
91 as this use case is popping up in other places (eg. canvases). It's exactly the
92 same idea except we can have as many place-holders as we want at arbitrary
95 This already tested by the render surface unit tests which now also use the
98 * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
99 (WebCore::CCLayerTreeHost::CCLayerTreeHost):
100 (WebCore::CCLayerTreeHost::initializeLayerRenderer):
101 (WebCore::CCLayerTreeHost::updateLayers):
102 (WebCore::CCLayerTreeHost::setPrioritiesForSurfaces):
104 (WebCore::CCLayerTreeHost::setPrioritiesForLayers):
105 (WebCore::CCLayerTreeHost::prioritizeTextures):
106 (WebCore::CCLayerTreeHost::calculateMemoryForRenderSurfaces):
107 (WebCore::CCLayerTreeHost::paintLayerContents):
108 * platform/graphics/chromium/cc/CCLayerTreeHost.h:
110 * platform/graphics/chromium/cc/CCPrioritizedTexture.cpp:
111 (WebCore::CCPrioritizedTexture::CCPrioritizedTexture):
112 (WebCore::CCPrioritizedTexture::setToSelfManagedMemoryPlaceholder):
113 * platform/graphics/chromium/cc/CCPrioritizedTexture.h:
114 (CCPrioritizedTexture):
115 (WebCore::CCPrioritizedTexture::setIsSelfManaged):
116 (WebCore::CCPrioritizedTexture::isSelfManaged):
117 * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp:
118 (WebCore::CCPrioritizedTextureManager::prioritizeTextures):
119 (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded):
120 (WebCore::CCPrioritizedTextureManager::destroyBacking):
121 * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h:
122 (CCPrioritizedTextureManager):
123 (WebCore::CCPrioritizedTextureManager::memoryForSelfManagedTextures):
125 2012-07-13 Kent Tamura <tkent@chromium.org>
127 Internals: Clean up the mock PagePopupDriver correctly.
128 https://bugs.webkit.org/show_bug.cgi?id=91250
130 Unreviewed, a trivial testing code fix.
132 * testing/InternalSettings.cpp:
133 (WebCore::InternalSettings::Backup::restoreTo):
134 (WebCore::InternalSettings::reset):
135 Resetting PaePopupDriver here instead of Backup::restoreTo.
136 Also, close the mock popup before resetting PagePopupDriver by clearing m_pagePopupDriver.
137 * testing/MockPagePopupDriver.cpp:
138 (WebCore::MockPagePopupDriver::~MockPagePopupDriver):
141 2012-07-13 Tony Payne <tpayne@chromium.org>
143 Remove Widget from screenColorProfile
144 https://bugs.webkit.org/show_bug.cgi?id=91300
146 Reviewed by Adam Barth.
148 Chromium, the only platform implementing screenColorProfile, does not
149 need the Widget, so removing for simplicity.
151 Covered by existing tests.
153 * platform/PlatformScreen.h:
154 (WebCore): Updated comment to remove reference to type param that no
155 longer exists and removed Widget param.
156 * platform/blackberry/PlatformScreenBlackBerry.cpp:
157 (WebCore::screenColorProfile): Removed widget param.
158 * platform/chromium/PlatformScreenChromium.cpp:
159 (WebCore::screenColorProfile): Removed widget param.
160 * platform/efl/PlatformScreenEfl.cpp:
161 (WebCore::screenColorProfile): Removed widget param.
162 * platform/gtk/PlatformScreenGtk.cpp:
163 (WebCore::screenColorProfile): Removed widget param.
164 * platform/image-decoders/ImageDecoder.h:
165 (WebCore::ImageDecoder::qcmsOutputDeviceProfile): removed param to
166 match screenColorProfile()'s new spec.
167 * platform/mac/PlatformScreenMac.mm:
168 (WebCore::screenColorProfile): Removed widget param.
169 * platform/qt/PlatformScreenQt.cpp:
170 (WebCore::screenColorProfile): Removed widget param.
171 * platform/win/PlatformScreenWin.cpp:
172 (WebCore::screenColorProfile): Removed widget param.
174 2012-07-13 Brian Anderson <brianderson@chromium.org>
176 [chromium] Add flushes to CCTextureUpdater::update
177 https://bugs.webkit.org/show_bug.cgi?id=89035
179 Reviewed by Adrienne Walker.
181 Automatic flushes are being removed from the command buffer, so
182 this moves the flushes into the CCTextureUpdater itself.
184 CCTextureUpdaterTest added to verify texture upload/flushing patterns.
186 * platform/graphics/chromium/cc/CCGraphicsContext.h:
187 (WebCore::CCGraphicsContext::flush):
189 * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
191 (WebCore::CCTextureUpdater::update): Manual flushes added here.
193 2012-07-13 Kiran Muppala <cmuppala@apple.com>
195 REGRESSION: RenderInline boundingBox ignores relative position offset
196 https://bugs.webkit.org/show_bug.cgi?id=91168
198 Reviewed by Simon Fraser.
200 RenderGeometryMap, used for caching the transform to the view,
201 expects the first mapping pushed, to be that of the view itself.
202 RenderInline was instead pushing it's own offset first. Besides
203 the offset of the view itself was not being pushed.
205 Relaxed the RenderGeometryMap restriction that the first pushed
206 step should be of the view. It is sufficient that the view's mapping
207 is pushed in the first call to pushMappingsToAncestor. Modified
208 RenderInline to push the offset of the view also to the geometry map.
210 Test: fast/inline/inline-relative-offset-boundingbox.html
212 * rendering/RenderGeometryMap.cpp:
213 (WebCore::RenderGeometryMap::pushMappingsToAncestor): Add assertion to
214 check if mapping to view was pushed in first invocation.
215 (WebCore::RenderGeometryMap::pushView): Correct assertion that checks
216 if the view's mapping is the first one to be applied.
217 (WebCore::RenderGeometryMap::stepInserted): Use isRenderView to check if
218 a mapping step belongs to a view instead of using mapping size.
219 (WebCore::RenderGeometryMap::stepRemoved): Ditto.
220 * rendering/RenderInline.cpp:
221 (WebCore::(anonymous namespace)::AbsoluteQuadsGeneratorContext::AbsoluteQuadsGeneratorContext):
222 Push mappings all the way up to and including the view.
224 2012-07-13 Xianzhu Wang <wangxianzhu@chromium.org>
226 Move WebCore/platform/text/Base64 to WTF/wtf/text
227 https://bugs.webkit.org/show_bug.cgi?id=91162
229 Reviewed by Adam Barth.
231 No new tests. Files moving only.
234 * GNUmakefile.list.am:
235 * Modules/websockets/WebSocketHandshake.cpp:
236 (WebCore::generateSecWebSocketKey):
237 (WebCore::WebSocketHandshake::getExpectedWebSocketAccept):
241 * WebCore.vcproj/WebCore.vcproj:
242 * WebCore.xcodeproj/project.pbxproj:
243 * fileapi/FileReaderLoader.cpp:
244 (WebCore::FileReaderLoader::convertToDataURL):
245 * inspector/DOMPatchSupport.cpp:
246 (WebCore::DOMPatchSupport::createDigest):
247 * inspector/InspectorFileSystemAgent.cpp:
249 * inspector/InspectorPageAgent.cpp:
250 (WebCore::InspectorPageAgent::cachedResourceContent):
251 (WebCore::InspectorPageAgent::sharedBufferContent):
252 * loader/archive/mhtml/MHTMLArchive.cpp:
253 (WebCore::MHTMLArchive::generateMHTMLData):
254 * loader/archive/mhtml/MHTMLParser.cpp:
255 (WebCore::MHTMLParser::parseNextPart):
256 * page/DOMWindow.cpp:
257 (WebCore::DOMWindow::btoa):
258 (WebCore::DOMWindow::atob):
260 (WebCore::Page::userStyleSheetLocationChanged):
261 * platform/graphics/cairo/ImageBufferCairo.cpp:
262 (WebCore::ImageBuffer::toDataURL):
263 * platform/graphics/cg/ImageBufferCG.cpp:
264 (WebCore::CGImageToDataURL):
265 * platform/graphics/gtk/ImageBufferGtk.cpp:
266 (WebCore::ImageBuffer::toDataURL):
267 * platform/graphics/skia/FontCustomPlatformData.cpp:
268 (WebCore::createUniqueFontName):
269 * platform/graphics/skia/ImageBufferSkia.cpp:
270 (WebCore::ImageBuffer::toDataURL):
271 (WebCore::ImageDataToDataURL):
272 * platform/graphics/win/FontCustomPlatformData.cpp:
273 (WebCore::createUniqueFontName):
274 * platform/graphics/wince/FontCustomPlatformData.cpp:
275 (WebCore::createUniqueFontName):
276 * platform/graphics/wince/ImageBufferWinCE.cpp:
277 * platform/graphics/wx/ImageBufferWx.cpp:
278 * platform/network/DataURL.cpp:
279 (WebCore::handleDataURL):
280 * platform/network/cf/ResourceHandleCFNet.cpp:
281 (WebCore::applyBasicAuthorizationHeader):
282 * platform/network/mac/ResourceHandleMac.mm:
283 (WebCore::applyBasicAuthorizationHeader):
284 * platform/network/soup/ResourceHandleSoup.cpp:
285 * platform/win/SSLKeyGeneratorWin.cpp:
286 (WebCore::WebCore::signedPublicKeyAndChallengeString):
288 2012-07-13 Xianzhu Wang <wangxianzhu@chromium.org>
290 [Chromium] Sometimes bottom of text is truncated when page has a fractional scale
291 https://bugs.webkit.org/show_bug.cgi?id=88684
293 Reviewed by Tony Chang.
295 When the page has a fractional scale, the ascent and descent part of the fonts might be fractional.
296 If the descent part is rounded down, the bottom of the text might be truncated when displayed
297 when subpixel text positioning is enabled.
298 To avoid that, borrow one unit from the ascent when possible.
300 Test: fast/text/descent-clip-in-scaled-page.html
302 * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
303 (WebCore::FontPlatformData::setupPaint): Moved NoPreference handling into querySystemForRenderStyle so that fontRenderStyle() can have actual styles without NoPreference.
304 (WebCore::FontPlatformData::querySystemForRenderStyle): Added NoPreference handling (moved from setupPaint)
305 * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
307 (WebCore::FontPlatformData::fontRenderStyle): Added to let SimpleFontDataSkia access the font render styles.
308 * platform/graphics/skia/SimpleFontDataSkia.cpp:
309 (WebCore::SimpleFontData::platformInit):
311 2012-07-13 Ryosuke Niwa <rniwa@webkit.org>
313 Remove an assertion after r122637.
315 * dom/DynamicNodeList.h:
316 (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange):
318 2012-07-13 Pierre Rossi <pierre.rossi@gmail.com>
320 [Qt] Improve the mobile theme slightly
321 https://bugs.webkit.org/show_bug.cgi?id=90806
323 Reviewed by Kenneth Rohde Christiansen.
325 Improve drawing of the mobile theme's controls' background.
327 Ensure the focus ring never appears with the mobile theme, since it
328 looks bad in combination with the highlights.
330 No new tests. The painting code from the mobile theme is still
331 not covered specifically (it will when we revive pixel tests).
333 * platform/qt/RenderThemeQtMobile.cpp:
335 (WebCore::addPointToOctants): Added. This is simply a helper to avoid
336 doing too much duplicate work in drawControlBackground.
337 (WebCore::drawControlBackground): Rely on the octant logic added above
338 and take the opportunity to increase the granularity.
339 (WebCore::borderPen):
340 (WebCore::StylePainterMobile::findLineEdit):
341 (WebCore::RenderThemeQtMobile::adjustTextFieldStyle):
342 * platform/qt/RenderThemeQtMobile.h:
343 (RenderThemeQtMobile):
344 (WebCore::RenderThemeQtMobile::supportsFocusRing):
346 2012-07-13 Julien Chaffraix <jchaffraix@webkit.org>
348 Remove an always-failing table-wrapping check in RenderObject::addChild
349 https://bugs.webkit.org/show_bug.cgi?id=91286
351 Reviewed by Eric Seidel.
353 Due to the structure of the code, this test is always failing (newChild->isTableCell()
354 is true to get in the branch).
356 The changeset adding the code didn't add testing so I poundered adding the mentioned test,
357 which is passing. However the test would need to be blindly changed to be included in our
358 test harness. I would also expect this code to be exercised by other table tests anyway.
360 * rendering/RenderObject.cpp:
361 (WebCore::RenderObject::addChild):
362 Removed never-reached branch. While at it, removed a 'what' comment in the same file.
364 2012-07-13 Emil A Eklund <eae@chromium.org>
366 Use LayoutBoxExtent for image outsets
367 https://bugs.webkit.org/show_bug.cgi?id=91166
369 Reviewed by Tony Chang.
371 Change RenderStyle and calling code to use LayoutBoxExtent for image
372 outsets and remove text direction and writing mode versions of the
373 outline getters from RenderStyle as LayoutBoxExtent provides the same
376 No new tests, no change in functionality.
378 * platform/graphics/FractionalLayoutBoxExtent.h:
379 * platform/graphics/FractionalLayoutBoxExtent.cpp:
380 (WebCore::FractionalLayoutBoxExtent::logicalTop):
381 (WebCore::FractionalLayoutBoxExtent::logicalBottom):
382 Add logicalTop and logicalBottom methods to go with the existing
383 logicalLeft and logicalRight ones.
385 * platform/graphics/FractionalLayoutRect.h:
386 (WebCore::FractionalLayoutRect::expand):
387 Add FractionalLayoutBoxExtent version of expand method.
389 * rendering/InlineFlowBox.cpp:
390 (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
391 Change implementation to use the new FractionalLayoutBoxExtent version of
392 borderImageOutsets and the logicalTop/Bottom/Left/Right methods.
394 (WebCore::clipRectForNinePieceImageStrip):
395 Change implementation to use the new FractionalLayoutBoxExtent version of
398 * rendering/RenderBox.cpp:
399 (WebCore::RenderBox::maskClipRect):
400 Change implementation to use the new FractionalLayoutBoxExtent version of
401 borderImageOutsets and the new FractionalLayoutRect::expand method.
403 (WebCore::RenderBox::addVisualEffectOverflow):
404 Change implementation to use the new FractionalLayoutBoxExtent version of
407 * rendering/RenderBoxModelObject.cpp:
408 (WebCore::RenderBoxModelObject::paintNinePieceImage):
409 Change implementation to use the new FractionalLayoutBoxExtent version of
410 borderImageOutsets and the new FractionalLayoutRect::expand method.
412 * rendering/style/RenderStyle.h:
413 * rendering/style/RenderStyle.cpp:
414 (WebCore::RenderStyle::imageOutsets):
415 Change getImageOutsets to return a FractionalLayoutBoxExtent object and
416 rename to imageOutsets to match the webkit naming convention for getters.
418 Remove getBorderImageHorizontalOutsets, getBorderImageVerticalOutsets,
419 getBorderImageInlineDirectionOutsets, getImageHorizontalOutsets,
420 getImageVerticalOutsets and getBorderImageBlockDirectionOutsets methods
421 as the same functionality is provided by FractionalLayoutBoxExtent.
423 2012-07-13 David Hyatt <hyatt@apple.com>
425 https://bugs.webkit.org/show_bug.cgi?id=91278
426 Improve block margin estimation function to account for not having a layout and for quirks mode
428 Reviewed by Simon Fraser.
430 * rendering/RenderBlock.cpp:
431 (WebCore::RenderBlock::marginBeforeEstimateForChild):
432 Revise marginBeforeEstimateForChild so that it computes block margins for the grandchild before
433 recurring. This includes the quirks margin information as well. This ensures that the margins are
434 up-to-date when checked, even before the object has had its first layout.
436 * rendering/RenderBlock.h:
437 (WebCore::RenderBlock::setMarginStartForChild):
438 (WebCore::RenderBlock::setMarginEndForChild):
439 (WebCore::RenderBlock::setMarginBeforeForChild):
440 (WebCore::RenderBlock::setMarginAfterForChild):
441 * rendering/RenderBox.cpp:
442 (WebCore::RenderBox::computeBlockDirectionMargins):
443 * rendering/RenderBox.h:
445 Add consts in order to compile.
447 2012-07-13 Ryosuke Niwa <rniwa@webkit.org>
449 NodeLists should not invalidate on irreleavnt attribute changes
450 https://bugs.webkit.org/show_bug.cgi?id=91277
452 Reviewed by Ojan Vafai.
454 Explicitely check the invalidation type and the changed attribute in NodeListNodeData::invalidateCaches
455 and ElementRareData::clearHTMLCollectionCaches to only invalidate node lists affected by the change.
457 Also merged invalidateNodeListsCacheAfterAttributeChanged and invalidateNodeListsCacheAfterChildrenChanged
458 as invalidateNodeListCachesInAncestors since they're almost identical after r122498.
460 In addition, moved shouldInvalidateNodeListForType from Document.cpp to DynamicNodeList.h and renamed it to
461 shouldInvalidateTypeOnAttributeChange since it needs to called in Node.cpp and ElementRareData.h.
464 (WebCore::Attr::setValue):
465 (WebCore::Attr::childrenChanged):
466 * dom/ContainerNode.cpp:
467 (WebCore::ContainerNode::childrenChanged):
469 (WebCore::Document::registerNodeListCache): Calls isRootedAtDocument() instead of directly comparing
470 the value of NodeListRootType in order to prepare for the bug 80269.
471 (WebCore::Document::unregisterNodeListCache): Ditto.
472 (WebCore): shouldInvalidateNodeListForType is moved to DynamicNodeList.h
473 (WebCore::Document::shouldInvalidateNodeListCaches):
474 * dom/DynamicNodeList.h:
475 (DynamicNodeListCacheBase):
476 (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange): Moved from Document.cpp.
478 (WebCore::Element::attributeChanged):
479 * dom/ElementRareData.h:
480 (WebCore::ElementRareData::clearHTMLCollectionCaches): Takes const QualifiedName* to compare against
481 the invalidation type of HTML collections via shouldInvalidateTypeOnAttributeChange.
483 (WebCore::Node::invalidateNodeListCachesInAncestors): Merged invalidateNodeListCachesInAncestors and
484 invalidateNodeListsCacheAfterChildrenChanged. Also pass attrName to clearHTMLCollectionCaches.
485 (WebCore::NodeListsNodeData::invalidateCaches): Compares attrName against the invalidation type of
486 node lists via shouldInvalidateTypeOnAttributeChange.
490 * dom/NodeRareData.h:
491 (WebCore::NodeRareData::ensureNodeLists): Merged NodeRareData::createNodeLists.
492 (WebCore::NodeRareData::clearChildNodeListCache): Moved from Node.cpp.
494 * html/HTMLCollection.h:
495 (HTMLCollectionCacheBase):
497 2012-07-13 Arpita Bahuguna <arpitabahuguna@gmail.com>
499 Refactor RenderTable to use the section's iteration functions.
500 https://bugs.webkit.org/show_bug.cgi?id=89751
502 Reviewed by Julien Chaffraix.
504 Removing anti-pattern wherever possible from RenderTable code. Also, modifying
505 RenderTable sections' iterations to use helper functions.
507 No new tests required for this change since no change in behavior is expected.
509 * rendering/RenderTable.cpp:
510 (WebCore::RenderTable::addOverflowFromChildren):
511 (WebCore::RenderTable::setCellLogicalWidths):
512 (WebCore::RenderTable::outerBorderStart):
513 (WebCore::RenderTable::outerBorderEnd):
514 Removed anti-patterns involving iterations over RenderObjects.
516 (WebCore::RenderTable::outerBorderAfter):
517 Modified RenderTable sections' iteration to use helper functions.
519 2012-07-13 Enrica Casucci <enrica@apple.com>
521 Threadsafety issues in WebScriptObject
522 https://bugs.webkit.org/show_bug.cgi?id=90849
524 Reviewed by Geoff Garen.
526 Updated fix for this bug. The JSC API lock needs to be acquired also in JSObject.
528 * bindings/objc/WebScriptObject.mm:
529 (-[WebScriptObject JSObject]):
531 2012-07-13 Raymond Toy <rtoy@google.com>
533 DelayNode doesn't work if delayTime.value == delayTime.maxValue
534 https://bugs.webkit.org/show_bug.cgi?id=90357
536 Reviewed by Kenneth Russell.
538 Increase delay buffer size slightly so that the read and write
539 pointers don't become equal when the delay and the max delay are
542 Tests: webaudio/delaynode-max-default-delay.html
543 webaudio/delaynode-max-nondefault-delay.html
545 * Modules/webaudio/DelayDSPKernel.cpp:
546 (WebCore): Moved SmoothingTimeConstant to WebCore namespace.
547 (WebCore::DelayDSPKernel::DelayDSPKernel): Add some additional checks to prevent crashes; use bufferLengthForDelay to compute buffer length.
548 (WebCore::DelayDSPKernel::bufferLengthForDelay): New function to compute buffer length.
549 * Modules/webaudio/DelayDSPKernel.h:
550 (DelayDSPKernel): Declare bufferLengthForDelay.
552 2012-07-13 Benjamin Poulain <bpoulain@apple.com>
554 Always aggressively preload on iOS
555 https://bugs.webkit.org/show_bug.cgi?id=91276
557 Reviewed by Simon Fraser.
559 * loader/cache/CachedResourceLoader.cpp:
560 (WebCore::CachedResourceLoader::preload):
562 2012-07-13 Vineet Chaudhary <rgf748@motorola.com>
564 Restructure V8Utilities::extractTransferables() with help of toV8Sequence()
565 https://bugs.webkit.org/show_bug.cgi?id=91208
567 Reviewed by Kentaro Hara.
569 We can remove the specialised check for MessagePort from V8Utilities::extractTransferables()
570 using toV8Sequence() as it validates the passed object for sequence type per WebIDL spec.
572 No new test as just refactoring.
573 Existing tests under fast/dom/Window/window-* fast/dom/events/*
576 * bindings/v8/V8Utilities.cpp:
577 (WebCore::extractTransferables):
579 2012-07-13 Vincent Scheib <scheib@chromium.org>
581 Pointer Lock handles disconnected DOM elements
582 https://bugs.webkit.org/show_bug.cgi?id=77029
584 Reviewed by Adrienne Walker.
586 Pointer Lock Controller now checks when elements or documents are
587 removed, and unlocks if the target element is being removed.
589 Tests: pointer-lock/locked-element-iframe-removed-from-dom.html
590 pointer-lock/locked-element-removed-from-dom.html
593 (WebCore::Document::detach):
595 (WebCore::Element::removedFrom):
596 (WebCore::Element::webkitRequestPointerLock):
597 * page/PointerLockController.cpp:
598 (WebCore::PointerLockController::requestPointerLock):
599 (WebCore::PointerLockController::elementRemoved):
601 (WebCore::PointerLockController::documentDetached):
602 (WebCore::PointerLockController::didLosePointerLock):
603 (WebCore::PointerLockController::enqueueEvent):
604 * page/PointerLockController.h:
606 (PointerLockController):
608 2012-07-13 Ryosuke Niwa <rniwa@webkit.org>
610 HTMLCollection should use DynamicNodeList's invalidation model
611 https://bugs.webkit.org/show_bug.cgi?id=90326
613 Reviewed by Anders Carlsson.
615 Make HTMLCollection invalidated upon attribute and children changes instead of invalidating it on demand
616 by comparing DOM tree versions. Node that HTMLCollections owned by Document are invalidated with other
617 document-rooted node lists in m_listsInvalidatedAtDocument for simplicity although this mechanism is
618 normally used for node lists owned by a non-Document node that contains nodes outside of its subtree.
619 ItemProperties and FormControls are more "traditional" users of the mechanism.
621 Also, merged DynamicNodeList::invalidateCache and HTMLCollection::invalidateCache.
624 (WebCore::Document::registerNodeListCache): Renamed. No longer takes NodeListInvalidationType or
625 NodeListRootType since they can be obtained from the cache base. Increment the node list counter for
626 InvalidateOnIdNameAttrChange when a HTMLCollection is passed in since all HTMLCollections need to be
627 invalidated on id or name content attribute changes due to named getters.
628 (WebCore::Document::unregisterNodeListCache): Ditto.
629 (WebCore::shouldInvalidateNodeListForType):
630 (WebCore::Document::shouldInvalidateNodeListCaches):
631 (WebCore::Document::clearNodeListCaches):
633 (WebCore): Added InvalidateOnIdNameAttrChange, InvalidateOnHRefAttrChange, and InvalidateOnAnyAttrChange.
635 * dom/DynamicNodeList.cpp:
636 (WebCore::DynamicNodeListCacheBase::invalidateCache): Added. Invalidates caches of both DynamicNodeList
637 and HTMLCollection. We can't afford to use virtual function calls here because this function is called on
638 all node lists and HTML collections owned by ancestors of an element under which a node is added, removed,
639 or its attributes are changed.
641 * dom/DynamicNodeList.h:
642 (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): Initializes member variables directly
643 instead of calling clearCache now that DynamicNodeListCacheBase::invalidateCache has become polymorphic.
644 (DynamicNodeListCacheBase): Increased the number of bits for m_invalidationType since we now have 9
646 (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList):
647 (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
648 * dom/ElementRareData.h:
650 (WebCore::ElementRareData::clearHTMLCollectionCaches): Added.
651 (WebCore::ElementRareData::adoptTreeScope): Added; similar to NodeRareData::adoptTreeScope.
653 (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Clears HTML collection caches as well as
655 (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Ditto.
656 * dom/NodeRareData.h:
657 (WebCore::NodeListsNodeData::adoptTreeScope):
658 * dom/TreeScopeAdopter.cpp:
659 (WebCore::TreeScopeAdopter::moveTreeToNewScope): Calls ElementRareData's adoptTreeScope as well as
661 * html/HTMLAllCollection.cpp:
662 (WebCore::HTMLAllCollection::namedItemWithIndex):
663 * html/HTMLCollection.cpp:
664 (WebCore::rootTypeFromCollectionType): Added. As mentioned above, treat all Document-owned HTML collection
665 as if rooted at document for convenience.
666 (WebCore::invalidationTypeExcludingIdAndNameAttributes): Added. Since all HTML collection requires
667 invalidation on id and name content attribute changes, which is taken care by the special logic in
668 Document::registerNodeListCache, exclude those two attributes from consideration.
669 (WebCore::HTMLCollection::HTMLCollection): Calls Document::registerNodeListCache.
670 (WebCore::HTMLCollection::~HTMLCollection): Calls Document::unregisterNodeListCache.
671 (WebCore::HTMLCollection::length):
672 (WebCore::HTMLCollection::item):
673 (WebCore::HTMLCollection::namedItem):
674 (WebCore::HTMLCollection::updateNameCache):
675 * html/HTMLCollection.h:
676 (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
677 (HTMLCollectionCacheBase): Removed m_cacheTreeVersion and clearCache since they're no longer used.
679 * html/HTMLFormCollection.cpp:
680 (WebCore::HTMLFormCollection::namedItem):
681 (WebCore::HTMLFormCollection::updateNameCache):
682 * html/HTMLOptionsCollection.h:
683 (HTMLOptionsCollection):
684 * html/HTMLPropertiesCollection.cpp:
685 (WebCore::HTMLPropertiesCollection::updateNameCache):
686 * html/HTMLPropertiesCollection.h:
687 (WebCore::HTMLPropertiesCollection::invalidateCache):
689 2012-07-13 Shawn Singh <shawnsingh@chromium.org>
691 [chromium] Remove incorrect debug assertion in LayerRendererChromium.cpp
692 https://bugs.webkit.org/show_bug.cgi?id=91260
694 Reviewed by Adrienne Walker.
696 ASSERT(!clipped) was being triggered after skinny almost-degenerate
697 quads went through anti-aliasing inflation, and then were being
698 transformed back from device space to local space. It turns out
699 this assertion is too aggressive, and we don't yet have an obvious
700 need to change the behavior on the clipped==true case.
702 No new tests needed, this patch fixes only comments and debug code.
704 * platform/graphics/chromium/LayerRendererChromium.cpp:
705 (WebCore::LayerRendererChromium::drawRenderPassQuad):
708 (WebCore::LayerRendererChromium::drawTileQuad):
709 fixed a similar comment, removed unnecessary assertion.
711 2012-07-13 Philip Rogers <pdr@google.com>
713 Remove assert in localCoordinateSpaceTransform()
714 https://bugs.webkit.org/show_bug.cgi?id=91189
716 Reviewed by Nikolas Zimmermann.
718 The assert in localCoordinateSpaceTransform was added to catch subclasses forgetting
719 to override the method but it is better to simply return the identity matrix.
721 This scenario can occur when we break the SVG content model, such as asking for
722 the CTM of a <g> element inside a <tspan>. This is undefined in the spec because
723 tspan is not a subclass of SVGLocatable but both Firefox and Opera
724 implement this by returning the identity matrix.
726 Test: svg/custom/invalid-ctm.svg
728 * svg/SVGStyledElement.cpp:
729 (WebCore::SVGStyledElement::localCoordinateSpaceTransform):
731 2012-07-13 Kentaro Hara <haraken@chromium.org>
733 [V8] String wrappers should be marked Independent
734 https://bugs.webkit.org/show_bug.cgi?id=91251
736 Reviewed by Adam Barth.
738 Currently V8 String wrappers are not marked Independent.
739 By marking them Independent, they can be reclaimed by the scavenger GC.
741 I tried to find some cases where this change reduces memory usage,
742 but couldn't due to sensitive behavior of GC.
744 No tests. No change in behavior.
746 * bindings/v8/V8Binding.cpp:
747 (WebCore::StringCache::v8ExternalStringSlow):
749 2012-07-13 Peter Beverloo <peter@chromium.org>
751 [Chromium] Make the v8 i18n API dependency conditional for Android, disable strict aliasing
752 https://bugs.webkit.org/show_bug.cgi?id=91240
754 Reviewed by Adam Barth.
756 Disable the v8 internationalization API for Chromium Android, as it's
757 disabled and not always available in checkouts. Furthermore, disable
758 strict aliasing for the webkit_remaining target, similar to what
759 x11-based builds are doing (see the webcore_prerequisites target).
761 * WebCore.gyp/WebCore.gyp:
763 2012-07-13 Kentaro Hara <haraken@chromium.org>
765 [CallWith=XXX] arguments should be placed at the head of method arguments
766 https://bugs.webkit.org/show_bug.cgi?id=91217
768 Reviewed by Adam Barth.
770 The EFL build with the ENABLE_FILE_SYSTEM flag caused a build error,
771 because CodeGeneratorJS.pm assumes webkitEntries(ScriptExecutionContext*, HTMLInputElement*)
772 but the actual signature is webkitEntries(HTMLInputElement*, ScriptExecutionContext*) (bug 91185).
774 Per https://trac.webkit.org/wiki/WebKitIDL#CallWith, [CallWith=XXX] arguments should be placed
775 at the head of the arguments. (i.e. the behavior of CodeGeneratorJS.pm is correct.)
777 Thus the correct fix is (1) to change the signature of webkitEntries() and webkitGetAsEntry()
778 so that ScriptExecutionContext* comes first and (2) to modify CodeGeneratorV8.pm to support the order.
780 Test: bindings/scripts/test/TestObj.idl
782 * Modules/filesystem/DataTransferItemFileSystem.h: Placed ScriptExecutionContext* at the head of arguments.
783 (DataTransferItemFileSystem):
784 * Modules/filesystem/HTMLInputElementFileSystem.cpp: Ditto.
785 (WebCore::HTMLInputElementFileSystem::webkitEntries):
786 * Modules/filesystem/HTMLInputElementFileSystem.h: Ditto.
787 (HTMLInputElementFileSystem):
788 * Modules/filesystem/chromium/DataTransferItemFileSystemChromium.cpp: Ditto.
789 (WebCore::DataTransferItemFileSystem::webkitGetAsEntry):
791 * bindings/scripts/CodeGeneratorV8.pm: Modified to support the correct order.
792 (GenerateNormalAttrGetter):
793 (GenerateNormalAttrSetter):
794 (GenerateFunctionCallString):
796 * bindings/scripts/test/V8/V8TestInterface.cpp: Updated run-bindings-tests results.
797 (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
799 2012-07-13 Mary Wu <mary.wu@torchmobile.com.cn>
801 [BlackBerry] Some small changes in network code
802 https://bugs.webkit.org/show_bug.cgi?id=90974
804 Reviewed by Rob Buis.
806 1. Set status in NetworkJob/SocketStreamHandleBlackBerry so that
807 its wrapped stream can also query the stream result.
808 2. pass download attribute to NetworkRequest.
811 Reviewed internally by Lyon Chen and Joe Mason.
813 * platform/network/blackberry/NetworkJob.cpp:
814 (WebCore::NetworkJob::handleNotifyClose):
815 * platform/network/blackberry/NetworkJob.h:
816 (WebCore::NetworkJob::status):
817 * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
818 (WebCore::platformTargetTypeForRequest):
819 * platform/network/blackberry/SocketStreamHandle.h:
820 (WebCore::SocketStreamHandle::status):
821 (SocketStreamHandle):
822 * platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
823 (WebCore::SocketStreamHandle::notifyStatusReceived):
824 (WebCore::SocketStreamHandle::notifyClose):
826 2012-07-13 Vsevolod Vlasov <vsevik@chromium.org>
828 Web Inspector: Remove uiSourceCode from Resource.
829 https://bugs.webkit.org/show_bug.cgi?id=91201
831 Reviewed by Pavel Feldman.
833 Removed Resource._uiSourceCode field as it is not used anymore.
835 * inspector/front-end/Resource.js:
836 (WebInspector.Resource.prototype.isHidden):
837 * inspector/front-end/UISourceCode.js:
838 (WebInspector.UISourceCode):
840 2012-07-13 Sheriff Bot <webkit.review.bot@gmail.com>
842 Unreviewed, rolling out r122450 and r122580.
843 http://trac.webkit.org/changeset/122450
844 http://trac.webkit.org/changeset/122580
845 https://bugs.webkit.org/show_bug.cgi?id=91263
847 Caused multiple regressions on ClusterFuzz (Requested by
848 inferno-sec on #webkit).
850 * bindings/js/ScriptWrappable.h:
851 (WebCore::ScriptWrappable::reportMemoryUsage):
852 * bindings/v8/DOMDataStore.cpp:
853 (WebCore::DOMDataStore::reportMemoryUsage):
854 * bindings/v8/IntrusiveDOMWrapperMap.h:
855 (WebCore::ChunkedTable::reportMemoryUsage):
856 * bindings/v8/ScriptWrappable.h:
857 (WebCore::ScriptWrappable::reportMemoryUsage):
858 * bindings/v8/V8Binding.cpp:
859 (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
860 (WebCore::StringCache::reportMemoryUsage):
861 * bindings/v8/V8DOMMap.h:
862 * css/PropertySetCSSStyleDeclaration.cpp:
863 (WebCore::InlineCSSStyleDeclaration::ensureMutablePropertySet):
864 * css/StylePropertySet.cpp:
865 * css/StylePropertySet.h:
866 (WebCore::StylePropertySet::reportMemoryUsage):
867 * dom/CharacterData.cpp:
868 (WebCore::CharacterData::reportMemoryUsage):
869 * dom/ContainerNode.h:
870 (WebCore::ContainerNode::reportMemoryUsage):
872 (WebCore::Document::reportMemoryUsage):
874 (WebCore::Element::detachAttribute):
875 (WebCore::Element::removeAttribute):
876 (WebCore::Element::attributes):
877 (WebCore::Element::setAttributeInternal):
878 (WebCore::Element::parserSetAttributes):
879 (WebCore::Element::hasEquivalentAttributes):
880 (WebCore::Element::createAttributeData):
882 (WebCore::Element::setAttributeNode):
883 (WebCore::Element::removeAttributeNode):
884 (WebCore::Element::getAttributeNode):
885 (WebCore::Element::getAttributeNodeNS):
886 (WebCore::Element::hasAttribute):
887 (WebCore::Element::hasAttributeNS):
888 (WebCore::Element::normalizeAttributes):
889 (WebCore::Element::cloneAttributesFromElement):
891 (WebCore::Element::attributeData):
893 (WebCore::Element::reportMemoryUsage):
894 (WebCore::Element::ensureAttributeData):
895 (WebCore::Element::updatedAttributeData):
896 (WebCore::Element::ensureUpdatedAttributeData):
897 * dom/ElementAttributeData.cpp:
898 (WebCore::ElementAttributeData::attrIfExists):
899 (WebCore::ElementAttributeData::ensureAttr):
900 (WebCore::ElementAttributeData::setAttr):
901 (WebCore::ElementAttributeData::removeAttr):
902 (WebCore::ElementAttributeData::setClass):
904 (WebCore::ElementAttributeData::ensureInlineStyle):
905 (WebCore::ElementAttributeData::ensureMutableInlineStyle):
906 (WebCore::ElementAttributeData::destroyInlineStyle):
907 (WebCore::ElementAttributeData::addAttribute):
908 (WebCore::ElementAttributeData::removeAttribute):
909 (WebCore::ElementAttributeData::isEquivalent):
910 (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
911 (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
912 (WebCore::ElementAttributeData::cloneDataFrom):
913 (WebCore::ElementAttributeData::clearAttributes):
914 (WebCore::ElementAttributeData::replaceAttribute):
915 (WebCore::ElementAttributeData::getAttributeNode):
916 * dom/ElementAttributeData.h:
917 (WebCore::ElementAttributeData::create):
918 (ElementAttributeData):
919 (WebCore::ElementAttributeData::setIdForStyleResolution):
920 (WebCore::ElementAttributeData::setAttributeStyle):
921 (WebCore::ElementAttributeData::length):
922 (WebCore::ElementAttributeData::isEmpty):
923 (WebCore::ElementAttributeData::attributeItem):
924 (WebCore::ElementAttributeData::getAttributeItem):
925 (WebCore::ElementAttributeData::reportMemoryUsage):
926 (WebCore::ElementAttributeData::ElementAttributeData):
927 (WebCore::ElementAttributeData::attributeVector):
928 (WebCore::ElementAttributeData::clonedAttributeVector):
929 (WebCore::ElementAttributeData::removeAttribute):
930 (WebCore::ElementAttributeData::getAttributeItemIndex):
931 * dom/MemoryInstrumentation.h:
932 (MemoryInstrumentation):
934 (WebCore::MemoryObjectInfo::reportInstrumentedPointer):
935 (WebCore::MemoryObjectInfo::reportPointer):
936 (WebCore::MemoryObjectInfo::reportInstrumentedObject):
937 (WebCore::MemoryObjectInfo::reportObject):
938 (WebCore::MemoryObjectInfo::reportObjectInfo):
939 (WebCore::MemoryObjectInfo::reportHashMap):
940 (WebCore::MemoryObjectInfo::reportHashSet):
941 (WebCore::MemoryObjectInfo::reportListHashSet):
942 (WebCore::MemoryObjectInfo::reportVector):
943 (WebCore::MemoryObjectInfo::reportString):
944 (WebCore::MemoryObjectInfo::objectType):
945 (WebCore::MemoryObjectInfo::objectSize):
946 (WebCore::MemoryObjectInfo::memoryInstrumentation):
948 (WebCore::Node::reportMemoryUsage):
949 * dom/QualifiedName.h:
950 (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
951 (WebCore::QualifiedName::reportMemoryUsage):
952 * dom/StyledElement.cpp:
953 (WebCore::StyledElement::style):
954 (WebCore::StyledElement::classAttributeChanged):
955 (WebCore::StyledElement::setInlineStyleProperty):
956 (WebCore::StyledElement::removeInlineStyleProperty):
957 (WebCore::StyledElement::addSubresourceAttributeURLs):
958 * dom/StyledElement.h:
959 (WebCore::StyledElement::ensureInlineStyle):
960 * html/parser/HTMLConstructionSite.cpp:
961 (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
962 * platform/TreeShared.h:
963 (WebCore::TreeShared::reportMemoryUsage):
964 * xml/parser/XMLDocumentParserQt.cpp:
965 (WebCore::XMLDocumentParser::XMLDocumentParser):
967 2012-07-13 Huang Dongsung <luxtella@company100.net>
969 Remove down-casting to BitmapImage in GraphicsContext::drawImage.
970 https://bugs.webkit.org/show_bug.cgi?id=90755
972 Reviewed by Simon Fraser.
974 Add a BitmapImage draw method which takes RespectImageOrientationEnum enum as
975 the last argument for CG. Then we can remove the conditional down-casting in
976 GraphicsContext::drawImage.
978 This change is needed for parallel image decoders. Because parallel image
979 decoders use a Bitmap image wrapper class which extends Image (not Bitmap), the
980 down-casting above causes the loss of RespectImageOrientationEnum which must be
981 passed to BitmapImage.
983 No new tests, no behavior change.
985 * platform/graphics/BitmapImage.cpp:
986 * platform/graphics/BitmapImage.h:
987 * platform/graphics/GraphicsContext.cpp:
988 (WebCore::GraphicsContext::drawImage):
989 * platform/graphics/Image.cpp:
990 (WebCore::Image::draw):
992 * platform/graphics/Image.h:
995 2012-07-13 Lauro Neto <lauro.neto@openbossa.org>
997 Fix QtWebKit build with OpenGLES after GC3D/E3D refactor
998 https://bugs.webkit.org/show_bug.cgi?id=91156
1000 Reviewed by Noam Rosenthal.
1002 Adds several build fixes.
1004 * platform/graphics/GraphicsContext3D.h:
1005 Use E3DOpenGLES instead of previously removed E3DQt.
1007 * platform/graphics/OpenGLESShims.h:
1008 Enable defines for Qt.
1010 * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
1011 (WebCore::Extensions3DOpenGLES::blitFramebuffer):
1013 (WebCore::Extensions3DOpenGLES::renderbufferStorageMultisample):
1014 (WebCore::Extensions3DOpenGLES::copyTextureCHROMIUM):
1015 Added pure virtual stubs.
1017 (WebCore::Extensions3DOpenGLES::supportsExtension):
1018 Remove PROC suffix. See bug #91130.
1020 * platform/graphics/opengl/Extensions3DOpenGLES.h:
1021 (Extensions3DOpenGLES):
1022 Added pure virtual stubs.
1024 * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
1025 (WebCore::GraphicsContext3D::reshapeFBOs):
1026 Readded missing function after removed in r122250.
1029 Use PLATFORM(BLACKBERRY) guard around port-specific include.
1031 * platform/graphics/qt/GraphicsContext3DQt.cpp:
1032 Added USE(OPENGL_ES_2) guard instead of always loading the OpenGL extensions.
1035 2012-07-13 Keishi Hattori <keishi@webkit.org>
1037 Form of FormAssociatedElement is not updated when id target changes.
1038 https://bugs.webkit.org/show_bug.cgi?id=91042
1040 Reviewed by Kent Tamura.
1042 Test: fast/forms/update-form-attribute-element.html
1044 This patch introduces the IdTargetObserver and IdTargetObserverRegistry class.
1045 They can be used to be notified when the element that an id is pointing to (the id target)
1048 * CMakeLists.txt: Added IdTargetObserverRegistry.{h,cpp} and IdTargetObserver.{h,cpp}
1049 * GNUmakefile.list.am: Ditto.
1050 * Target.pri: Ditto.
1051 * WebCore.gypi: Ditto.
1052 * WebCore.vcproj/WebCore.vcproj: Ditto.
1053 * WebCore.xcodeproj/project.pbxproj: Ditto.
1054 * dom/DOMAllInOne.cpp:
1055 * dom/IdTargetObserver.cpp: Added. When you want notified of changes to an id target, you should create a new class that inherits this.
1057 (WebCore::IdTargetObserver::IdTargetObserver):
1058 (WebCore::IdTargetObserver::~IdTargetObserver):
1059 * dom/IdTargetObserver.h: Added.
1062 * dom/IdTargetObserverRegistry.cpp: Added.
1064 (WebCore::IdTargetObserverRegistry::create):
1065 (WebCore::IdTargetObserverRegistry::addObserver): Register an IdTargetObserver to observe an id target.
1066 (WebCore::IdTargetObserverRegistry::removeObserver): Unregisters an IdTargetObserver from observing.
1067 (WebCore::IdTargetObserverRegistry::notifyObserversInternal):
1068 * dom/IdTargetObserverRegistry.h: Added.
1070 (IdTargetObserverRegistry):
1071 (WebCore::IdTargetObserverRegistry::IdTargetObserverRegistry):
1072 (WebCore::IdTargetObserverRegistry::notifyObservers): Calls idTargetChanged on all observers for an id. Inlining first part of function for performance.
1073 * dom/TreeScope.cpp:
1074 (WebCore::TreeScope::TreeScope):
1075 (WebCore::TreeScope::addElementById): Calls IdTargetObserverRegistry::notifyObservers because the id target might have changed.
1076 (WebCore::TreeScope::removeElementById): Ditto.
1079 (WebCore::TreeScope::idTargetObserverRegistry):
1081 * html/FormAssociatedElement.cpp: Observer for id targets defined by the form attribute.
1082 (WebCore::FormAssociatedElement::didMoveToNewDocument):
1083 (WebCore::FormAssociatedElement::insertedInto):
1084 (WebCore::FormAssociatedElement::removedFrom):
1085 (WebCore::FormAssociatedElement::formAttributeChanged):
1086 (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver): Creates and sets up a new FormAttributeTargetObserver.
1088 (WebCore::FormAssociatedElement::formAttributeTargetChanged):
1089 (WebCore::FormAttributeTargetObserver::create):
1090 (WebCore::FormAttributeTargetObserver::FormAttributeTargetObserver):
1091 (WebCore::FormAttributeTargetObserver::idTargetChanged):
1092 * html/FormAssociatedElement.h:
1093 (FormAssociatedElement):
1094 * html/FormController.cpp:
1095 * html/FormController.h:
1097 * html/HTMLFormElement.cpp:
1098 (WebCore::HTMLFormElement::removedFrom):
1099 (WebCore::HTMLFormElement::formElementIndexWithFormAttribute): Modified to take a range. It
1100 scans the range and returns the index to insert the element in m_associatedElement.
1101 (WebCore::HTMLFormElement::formElementIndex): Modified to only scan the elements in
1102 m_associatedElement that precede and follow the form element.
1103 * html/HTMLFormElement.h:
1106 2012-07-13 Gabor Rapcsanyi <rgabor@webkit.org>
1108 Optimizing blend filter to ARM-NEON with intrinsics
1109 https://bugs.webkit.org/show_bug.cgi?id=90949
1111 Reviewed by Zoltan Herczeg.
1113 The feBlend SVG filter modes can be greatly fasten up with ARM-NEON since
1114 we are able to calculate with 2 pixels (8 channels) at the same time.
1115 The code is written with NEON intrinsics and it doesn't affect the
1116 general - it has the same behaviour as the original algorithm.
1117 With this NEON optimization the calculation is ~4.5 times faster for each mode.
1119 Existing tests cover this issue.
1122 * GNUmakefile.list.am:
1125 * WebCore.vcproj/WebCore.vcproj:
1126 * WebCore.xcodeproj/project.pbxproj:
1127 * platform/graphics/filters/FEBlend.cpp:
1128 (WebCore::FEBlend::platformApplyGeneric):
1130 (WebCore::FEBlend::platformApplySoftware):
1131 * platform/graphics/filters/FEBlend.h:
1133 * platform/graphics/filters/arm/FEBlendNEON.h: Added.
1135 (FEBlendUtilitiesNEON):
1136 (WebCore::FEBlendUtilitiesNEON::div255): integer divison with 255
1137 (WebCore::FEBlendUtilitiesNEON::normal): calculate normal mode blending for two pixels
1138 (WebCore::FEBlendUtilitiesNEON::multiply): calculate multiply mode blending for two pixels
1139 (WebCore::FEBlendUtilitiesNEON::screen): calculate screen mode blending for two pixels
1140 (WebCore::FEBlendUtilitiesNEON::darken): calculate darken mode blending for two pixels
1141 (WebCore::FEBlendUtilitiesNEON::lighten): calculate lighten mode blending for two pixels
1142 (WebCore::FEBlend::platformApplyNEON):
1144 2012-07-13 Ilya Tikhonovsky <loislo@chromium.org>
1146 Web Inspector: native memory instrumentation: extract instrumentation methods into MemoryClassInfo
1147 https://bugs.webkit.org/show_bug.cgi?id=91227
1149 Reviewed by Pavel Feldman.
1151 void Node::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
1153 MemoryClassInfo<Node> info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
1154 info.visitBaseClass<ScriptWrappable>(this);
1156 info.addMember(m_notInstrumentedPointer); // automatically detects poniter/reference
1157 info.addInstrumentedMember(m_next);
1158 info.addHashSet<MemoryInstrumentation::NonClass>(m_aHash); // NonClass value_type (report only size of internal template structures)
1159 info.addHashSet<MemoryInstrumentation::NotInstrumentedClass>(m_aHashSet); // not instrumented value_type (use sizeof)
1160 info.addHashSet<MemoryInstrumentation::InstrumentedClass>(m_aHashSet); // instrumented value_type (call visit)
1163 The change is covered by existing tests for native memory snapshot.
1165 * bindings/v8/DOMDataStore.cpp:
1166 (WebCore::DOMDataStore::reportMemoryUsage):
1167 * bindings/v8/IntrusiveDOMWrapperMap.h:
1168 (WebCore::ChunkedTable::reportMemoryUsage):
1169 * bindings/v8/ScriptWrappable.h:
1170 (WebCore::ScriptWrappable::reportMemoryUsage):
1171 * bindings/v8/V8Binding.cpp:
1172 (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
1173 (WebCore::StringCache::reportMemoryUsage):
1174 * bindings/v8/V8DOMMap.h:
1175 * css/StylePropertySet.h:
1176 (WebCore::StylePropertySet::reportMemoryUsage):
1177 * dom/CharacterData.cpp:
1178 (WebCore::CharacterData::reportMemoryUsage):
1179 * dom/ContainerNode.h:
1180 (WebCore::ContainerNode::reportMemoryUsage):
1182 (WebCore::Document::reportMemoryUsage):
1184 (WebCore::Element::reportMemoryUsage):
1185 * dom/ElementAttributeData.h:
1186 (WebCore::ElementAttributeData::reportMemoryUsage):
1187 * dom/MemoryInstrumentation.h:
1188 (MemoryInstrumentation):
1189 (WebCore::MemoryObjectInfo::objectType):
1190 (WebCore::MemoryObjectInfo::objectSize):
1191 (WebCore::MemoryObjectInfo::memoryInstrumentation):
1193 (WebCore::MemoryObjectInfo::reportObjectInfo):
1196 (WebCore::MemoryClassInfo::MemoryClassInfo):
1197 (WebCore::MemoryClassInfo::visitBaseClass):
1198 (WebCore::MemoryClassInfo::reportInstrumentedPointer):
1199 (WebCore::MemoryClassInfo::reportInstrumentedObject):
1200 (WebCore::MemoryClassInfo::reportPointer):
1201 (WebCore::MemoryClassInfo::reportObject):
1202 (WebCore::MemoryClassInfo::reportHashMap):
1203 (WebCore::MemoryClassInfo::reportHashSet):
1204 (WebCore::MemoryClassInfo::reportListHashSet):
1205 (WebCore::MemoryClassInfo::reportVector):
1206 (WebCore::MemoryClassInfo::reportString):
1208 (WebCore::Node::reportMemoryUsage):
1209 * dom/QualifiedName.h:
1210 (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
1211 (WebCore::QualifiedName::reportMemoryUsage):
1212 * platform/TreeShared.h:
1213 (WebCore::TreeShared::reportMemoryUsage):
1215 2012-07-13 Pavel Feldman <pfeldman@chromium.org>
1217 Web Inspector: align scope filters
1218 https://bugs.webkit.org/show_bug.cgi?id=91213
1220 Reviewed by Vsevolod Vlasov.
1222 * inspector/front-end/elementsPanel.css:
1224 * inspector/front-end/inspector.css:
1225 (.status-bar > div):
1228 (.scope-bar li.all):
1229 * inspector/front-end/networkLogView.css:
1231 2012-07-13 Peter Rybin <peter.rybin@gmail.com>
1233 Web Inspector: too many hardcoded strings in InspectorBackendDispatcher.
1234 https://bugs.webkit.org/show_bug.cgi?id=89198
1236 Reviewed by Yury Semikhatsky.
1238 Instead of generating error message string on every call (mostly for nothing),
1239 error message is generated deeper inside the handler and only command name
1240 is passed every time.
1242 * inspector/CodeGeneratorInspector.py:
1243 (Generator.process_command):
1245 2012-07-13 Joshua Netterfield <jnetterfield@rim.com>
1247 [BlackBerry] Update about:* pages
1248 https://bugs.webkit.org/show_bug.cgi?id=91121
1250 Reviewed by Yong Li.
1252 Update the about:config pages, and improve the aesthetics of the about:build, about:version, about:credits, about:memory, about:config, and similar pages.
1254 No new tests, because there is no new funtionality.
1256 * platform/network/blackberry/NetworkJob.cpp: Update the aesthetics of about:* pages
1258 2012-07-13 Olivier Blin <olivier.blin@softathome.com>
1260 Fix checking for optional DeviceOrientationEvent.absolute in JSC bindings
1261 https://bugs.webkit.org/show_bug.cgi?id=91225
1263 Reviewed by Steve Block.
1265 This issue comes from r105036
1267 * bindings/js/JSDeviceOrientationEventCustom.cpp:
1268 (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
1270 2012-07-13 Andrei Bucur <abucur@adobe.com>
1271 [CSS Regions] Fix build for bug 89000
1272 https://bugs.webkit.org/show_bug.cgi?id=91215
1274 Reviewed by Kentaro Hara.
1276 Remove the unused variable m_state that was a leftover from a previous version of the patch.
1278 Tests: No new tests, build fix.
1280 * dom/WebKitNamedFlow.cpp:
1281 (WebCore::WebKitNamedFlow::WebKitNamedFlow):
1282 * dom/WebKitNamedFlow.h:
1285 2012-07-13 Kenichi Ishibashi <bashi@chromium.org>
1287 [Chromium] Fix bugs in HarfBuzzShaper
1288 https://bugs.webkit.org/show_bug.cgi?id=90951
1290 Reviewed by Tony Chang.
1292 The current implementation has following problems:
1293 - Cannot render RTL text if the TextRun is divided into more than two
1295 - Script handling in TextRun partitioning is incorrect.
1296 - Inaccurate calculation of selection rect.
1297 - Wrong rendering position when the first glyph of the TextRun have
1298 non-zero offsets in terms of HarfBuzz.
1300 To fix these problems I rewrote HarfBuzzShaper class. Here is the summary:
1301 - Divide the whole range of TextRun first, then shape them in visual
1303 - Divide TextRun in the same way of old-harfbuzz's
1304 hb_utf16_script_run_next().
1305 - Prefer float than int when calculating selection.
1306 - Adjust the drawing point after shaping.
1308 Added tests covers the fix except for the last problem. The last problem will be covered
1309 by fast/text/international/complex-joining-using-gpos.html after chromium linux port switches
1310 to use HarfBuzzShaper.
1312 Tests: fast/text/shaping/shaping-script-order.html
1313 fast/text/shaping/shaping-selection-rect.html
1315 * platform/graphics/harfbuzz/FontHarfBuzz.cpp:
1316 (WebCore::Font::drawComplexText): Adjusts point after shaping.
1317 * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
1318 (WebCore::HarfBuzzShaper::HarfBuzzRun::HarfBuzzRun):
1320 (WebCore::HarfBuzzShaper::HarfBuzzRun::applyShapeResult): Added.
1321 (WebCore::HarfBuzzShaper::HarfBuzzRun::setGlyphAndAdvance): Offsets are no longer needed.
1322 (WebCore::HarfBuzzShaper::HarfBuzzRun::xPositionForOffset): Calculates character offset based on advance.
1323 (WebCore::normalizeCharacters): Added.
1324 (WebCore::HarfBuzzShaper::HarfBuzzShaper):
1325 (WebCore::HarfBuzzShaper::~HarfBuzzShaper):
1326 (WebCore::HarfBuzzShaper::shape): Divides TextRun first, then shapes them.
1327 (WebCore::HarfBuzzShaper::adjustStartPoint): Added.
1328 (WebCore::HarfBuzzShaper::collectHarfBuzzRuns): Added.
1329 (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Added.
1330 (WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun): Followed other changes.
1331 (WebCore::HarfBuzzShaper::selectionRect): Use float for calculating selection.
1332 * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h:
1333 (HarfBuzzShaper): Holds the start index of character. Removed unnecessary variables.
1334 (WebCore::HarfBuzzShaper::HarfBuzzRun::create): Ditto.
1336 (WebCore::HarfBuzzShaper::HarfBuzzRun::fontData): Added.
1337 (WebCore::HarfBuzzShaper::HarfBuzzRun::startIndex): Ditto.
1338 (WebCore::HarfBuzzShaper::HarfBuzzRun::glyphs): Ditto.
1339 (WebCore::HarfBuzzShaper::HarfBuzzRun::advances): Ditto.
1341 2012-07-13 Kentaro Hara <haraken@chromium.org>
1343 Unreviewed, rolling out r122545.
1344 http://trac.webkit.org/changeset/122545
1345 https://bugs.webkit.org/show_bug.cgi?id=91185
1347 We found that this was a wrong fix
1349 * bindings/scripts/CodeGeneratorJS.pm:
1350 (GenerateImplementation):
1352 2012-07-13 Kentaro Hara <haraken@chromium.org>
1354 Unreviewed, rolling out r122553.
1355 http://trac.webkit.org/changeset/122553
1356 https://bugs.webkit.org/show_bug.cgi?id=91198
1358 We found that this was a wrong fix
1360 * bindings/scripts/CodeGeneratorJS.pm:
1361 (GenerateImplementation):
1363 2012-07-13 Kent Tamura <tkent@chromium.org>
1365 Change the timing of form state restore
1366 https://bugs.webkit.org/show_bug.cgi?id=89962
1368 Reviewed by Hajime Morita.
1370 For a preparation to fix a form identification problem (Bug 91209),
1371 restore controls states when the parsing of their owner forms is
1372 completed. For controls without owners, their states are restored when
1373 their parsing is completed as ever.
1375 No new tests. This doesn't change observable behavior.
1377 * html/FormController.cpp:
1378 (WebCore::ownerFormForState):
1379 Added. This code was used in formKey(), and restoreControlState*() use it.
1380 (WebCore::FormKeyGenerator::formKey): Use ownerFormForState(). No behavior change.
1381 (WebCore::FormController::restoreControlStateFor):
1382 Moved some code from HTMLFormControlElementWithState::finishParsingChildren().
1383 The difference is we don't resotre state if this control is owned by a form.
1384 (WebCore::FormController::restoreControlStateIn):
1385 Restore states of associated controls. This is called from
1386 finishParsingChildren() for <form>.
1387 * html/FormController.h:
1389 - Declare restoreControlStateFor() and restoreControlStateIn().
1390 - Make takeStateForFormElement() private.
1392 * html/FormAssociatedElement.cpp:
1393 (WebCore::FormAssociatedElement::isFormControlElementWithState):
1394 Added. The default implementation returns false.
1395 * html/FormAssociatedElement.h:
1396 (FormAssociatedElement):
1397 Added isFormControlElementWithState() for FormController::restoreControlStateIn().
1398 * html/HTMLFormControlElementWithState.cpp:
1399 (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
1400 Some code was moved to FormController:restoreControlStateFor().
1401 (WebCore::HTMLFormControlElementWithState::isFormControlElementWithState):
1402 Added. Returns true.
1403 * html/HTMLFormControlElementWithState.h:
1404 (HTMLFormControlElementWithState): Declare isFormControlElementWithState().
1405 * html/HTMLFormElement.cpp:
1406 (WebCore::HTMLFormElement::finishParsingChildren):
1407 Added. Calls FormController::restoreControlStateIn().
1408 * html/HTMLFormElement.h:
1409 (HTMLFormElement): Declare finishParsingChildren().
1411 2012-07-13 Kent Tamura <tkent@chromium.org>
1413 Make calendar pickers testable
1414 https://bugs.webkit.org/show_bug.cgi?id=84827
1416 Reviewed by Hajime Morita.
1419 - Add PagePopupDriver, an interface to open/close a PagePopup.
1420 - Add setPagePopupDriver() to ChromeClient in order to inject a
1421 PagePopupDriver for testing.
1424 Add MockPagePopupDriver, which creates a MockPagePopup, which creates a
1425 normal <iframe> in the top-level document, and load the popup content on
1426 it. MockPagePopupDriver is enabled by
1427 internals.settings.setEnableMockPagePopup(true).
1429 Test: fast/forms/date/calendar-picker-appearance.html
1431 * WebCore.gypi: Add new files.
1432 * WebCore.xcodeproj/project.pbxproj: Add files to make this buildable.
1433 * page/ChromeClient.h:
1434 (ChromeClient): Add function for PagePopupDriver.
1435 * loader/EmptyClients.h: Add empty implementations for PagePopupDriver functions.
1436 * page/PagePopupDriver.h: Added.
1438 (WebCore::PagePopupDriver::~PagePopupDriver):
1440 * testing/InternalSettings.cpp:
1441 (WebCore::InternalSettings::Backup::restoreTo): Reset the mock PagePopupDriver.
1442 (WebCore::InternalSettings::setEnableMockPagePopup):
1443 Register MockPagePopupDriver to ChromeClient.
1444 * testing/InternalSettings.h:
1445 (InternalSettings): Declare setEnableMockPagePopup().
1446 * testing/InternalSettings.idl: ditto.
1447 * testing/MockPagePopupDriver.cpp: Added.
1448 (MockPagePopup): Pseudo PagePopup implementation with the standard <iframe>.
1449 (WebCore::MockPagePopupDriver::MockPagePopupDriver): Added.
1450 (WebCore::MockPagePopupDriver::create): Added.
1451 (WebCore::MockPagePopupDriver::~MockPagePopupDriver): Added.
1452 (WebCore::MockPagePopupDriver::openPagePopup):
1453 Added. An override of PagePopupDriver function. This creates a MockPagePopup.
1454 (WebCore::MockPagePopupDriver::closePagePopup):
1455 Added. An override of PagePopupDriver function. This deletes the MockPagePopup.
1456 * testing/MockPagePopupDriver.h:
1457 (MockPagePopupDriver): Added.
1459 * testing/v8/WebCoreTestSupport.cpp:
1460 (WebCoreTestSupport::injectPagePopupController):
1461 Added. Production code uses per-Page context feature framework. However
1462 MockPagePopup uses the same page as the host page. So we can't use the
1463 framework and need to inject window.pagePopupController manually.
1464 * testing/v8/WebCoreTestSupport.h:
1465 (WebCoreTestSupport): Add injectPagePopupController().
1467 2012-07-12 Pavel Feldman <pfeldman@chromium.org>
1469 Web Inspector: mute the native looks of the selects in the console.
1470 https://bugs.webkit.org/show_bug.cgi?id=91120
1472 Reviewed by Vsevolod Vlasov.
1474 This is necessary for Mac now that we don't use border images for select.
1476 * inspector/front-end/ConsoleView.js:
1477 (WebInspector.ConsoleView.prototype.get statusBarItems):
1478 (WebInspector.ConsoleView.prototype.addContext):
1479 (WebInspector.ConsoleView.prototype.removeContext):
1480 (WebInspector.ConsoleView.prototype._updateIsolatedWorldSelector):
1481 (WebInspector.ConsoleView.prototype._appendIsolatedContextOption):
1482 (WebInspector.ConsoleView.prototype._currentEvaluationContext):
1483 (WebInspector.ConsoleView.prototype._currentIsolatedContextId):
1484 * inspector/front-end/StatusBarButton.js:
1485 (WebInspector.StatusBarComboBox):
1486 (WebInspector.StatusBarComboBox.prototype.addOption):
1487 (WebInspector.StatusBarComboBox.prototype.removeOption):
1488 (WebInspector.StatusBarComboBox.prototype.removeOptions):
1489 (WebInspector.StatusBarComboBox.prototype.selectedOption):
1490 * inspector/front-end/inspector.css:
1491 (.status-bar-select-container):
1492 (select.status-bar-item):
1495 2012-07-13 Andrei Bucur <abucur@adobe.com>
1497 [CSS Regions] Fix the lifecycle for the flow objects and their renderers
1498 https://bugs.webkit.org/show_bug.cgi?id=89000
1500 Reviewed by Eric Seidel.
1502 This patch adds the concept of a NamedFlowCollection, owned by the document, that keeps track of
1503 all the named flows that exist in the Document. This collection contains a ListHashSet of weak references to
1504 all the existing NamedFlows in the document. This is not a managed set because the CREATED flows are referenced from the renderer and
1505 the NULL flows are only cached, they should be destructible.
1506 Two named flows are considered to be equal if they have the same name.
1507 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.
1508 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
1509 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
1510 so when they go back to the CREATED state, the listeners would still be there.
1512 Link to spec: http://www.w3.org/TR/2012/WD-css3-regions-20120503/
1514 Tests: The old tests have been modified to take into account the new behavior
1517 * GNUmakefile.list.am:
1520 * WebCore.vcproj/WebCore.vcproj:
1521 * WebCore.xcodeproj/project.pbxproj:
1522 * dom/DOMAllInOne.cpp:
1524 (WebCore::Document::~Document):
1526 (WebCore::Document::webkitGetFlowByName):
1527 (WebCore::Document::namedFlows):
1531 * dom/WebKitNamedFlow.cpp:
1532 (WebCore::WebKitNamedFlow::WebKitNamedFlow):
1533 (WebCore::WebKitNamedFlow::~WebKitNamedFlow):
1534 (WebCore::WebKitNamedFlow::create):
1536 (WebCore::WebKitNamedFlow::name):
1537 (WebCore::WebKitNamedFlow::overset):
1538 (WebCore::nodeInFlowThread):
1539 (WebCore::WebKitNamedFlow::getRegionsByContentNode):
1540 (WebCore::WebKitNamedFlow::getContent):
1541 (WebCore::WebKitNamedFlow::setRenderer):
1542 * dom/WebKitNamedFlow.h:
1545 (WebCore::WebKitNamedFlow::getFlowState):
1546 (WebCore::WebKitNamedFlow::switchFlowState):
1547 * dom/WebKitNamedFlowCollection.cpp: Added.
1549 (WebCore::WebKitNamedFlowCollection::WebKitNamedFlowCollection):
1550 (WebCore::WebKitNamedFlowCollection::length): An O(1) operation
1551 (WebCore::WebKitNamedFlowCollection::item): An O(N) operation
1552 (WebCore::WebKitNamedFlowCollection::flowByName): An O(1) operation
1553 (WebCore::WebKitNamedFlowCollection::ensureNamedFlowInCreatedState): An O(1) operation
1554 (WebCore::WebKitNamedFlowCollection::moveNamedFlowToNullState): An O(1) operation
1555 (WebCore::WebKitNamedFlowCollection::discardNamedFlow): An O(1) operation
1556 (WebCore::WebKitNamedFlowCollection::documentDestroyed):
1557 (WebCore::WebKitNamedFlowCollection::NamedFlowHashFunctions::hash):
1558 (WebCore::WebKitNamedFlowCollection::NamedFlowHashFunctions::equal):
1559 (WebKitNamedFlowCollection::NamedFlowHashFunctions):
1560 (WebCore::WebKitNamedFlowCollection::NamedFlowHashTranslator::hash):
1561 (WebCore::WebKitNamedFlowCollection::NamedFlowHashTranslator::equal):
1562 * dom/WebKitNamedFlowCollection.h: Copied from Source/WebCore/dom/WebKitNamedFlow.h.
1564 (WebKitNamedFlowCollection):
1565 (WebCore::WebKitNamedFlowCollection::create):
1566 (WebCore::WebKitNamedFlowCollection::document):
1567 * rendering/FlowThreadController.cpp:
1568 (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
1569 (WebCore::FlowThreadController::removeFlowThread):
1571 * rendering/FlowThreadController.h:
1572 (FlowThreadController):
1573 * rendering/RenderNamedFlowThread.cpp:
1574 (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
1576 (WebCore::RenderNamedFlowThread::~RenderNamedFlowThread):
1577 (WebCore::RenderNamedFlowThread::removeRegionFromThread):
1578 (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentNode):
1579 (WebCore::RenderNamedFlowThread::flowThreadName):
1580 (WebCore::RenderNamedFlowThread::willBeDestroyed):
1581 * rendering/RenderNamedFlowThread.h:
1582 (RenderNamedFlowThread):
1583 (WebCore::RenderNamedFlowThread::contentNodes):
1584 (WebCore::RenderNamedFlowThread::canBeDestroyed):
1586 2012-07-13 Vineet Chaudhary <rgf748@motorola.com>
1588 [V8Bindings] Implement generalised method to validates that the passed object is a sequence type.
1589 https://bugs.webkit.org/show_bug.cgi?id=91056
1591 Reviewed by Kentaro Hara.
1593 Currently the V8 implementation validates that the passed object is a sequence type only
1594 for MessagePort in V8Utilities::extractTransferables().
1595 There should be generalised method for other types too.
1596 Spec URL: http://www.w3.org/TR/2012/WD-WebIDL-20120207/#es-sequence
1598 No new test, Just refactoring. There should be no behavioral changes.
1600 * bindings/v8/V8Binding.h:
1601 (WebCore::toV8Sequence): Added implementation of toV8Sequence().
1603 2012-07-13 Zeno Albisser <zeno@webkit.org>
1605 [Qt][WK2] Implement GraphicsSurface for Linux/GLX.
1606 https://bugs.webkit.org/show_bug.cgi?id=90881
1608 Add a GLX based GraphicsSurface implementation for Linux.
1609 Native X windows are being used for exchanging textures
1612 Reviewed by Noam Rosenthal.
1616 * platform/graphics/surfaces/GraphicsSurface.cpp:
1617 (WebCore::GraphicsSurface::create):
1618 Move creating GraphicsSurface instance into
1619 platformCreate/platformImport functions to allow
1620 platform specific creation based on the provided flags.
1621 (WebCore::GraphicsSurface::GraphicsSurface):
1622 (WebCore::GraphicsSurface::~GraphicsSurface):
1623 Call platformDestroy when destroying a GraphicsSurface.
1625 * platform/graphics/surfaces/GraphicsSurface.h:
1626 Make platformCreate/platformImport functions static
1627 to be able to call these from the static create function.
1628 Add Destructor prototype and add GraphicsSurfacePrivate member.
1631 * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
1633 (WebCore::GraphicsSurface::platformCreate):
1634 (WebCore::GraphicsSurface::platformImport):
1635 Insert creation of GraphicsSurface instance.
1636 This allows having a platform specific creation mechanism
1638 * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp: Added.
1640 (OffScreenRootWindow):
1641 (WebCore::OffScreenRootWindow::OffScreenRootWindow):
1642 (WebCore::OffScreenRootWindow::get):
1643 (WebCore::OffScreenRootWindow::~OffScreenRootWindow):
1644 Add an OffScreenRootWindow singelton that is being used
1645 as a parent for all native offscreen windows.
1646 (GraphicsSurfacePrivate):
1647 This class is used to manage all the X related resources
1648 such as opening a display or creating XPixmaps etc.
1649 (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
1650 Open a connection to the X server and create a
1651 QOpenGLContext that can be used to resolve GL functions.
1652 (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
1653 Properly cleanup and release all the X resources again.
1654 (WebCore::GraphicsSurfacePrivate::createSurface):
1655 Create a surface that is placed off screen and can be
1656 used as a rendering target by the WebProcess.
1657 (WebCore::GraphicsSurfacePrivate::createPixmap):
1658 Create a GLXPixmap from the XWindow that was previously
1659 redirected by the WebProcess. This GLXPixmap can then be
1660 bound to a texture and being painted on screen by the
1662 (WebCore::GraphicsSurfacePrivate::makeCurrent):
1663 (WebCore::GraphicsSurfacePrivate::swapBuffers):
1664 (WebCore::GraphicsSurfacePrivate::display):
1665 (WebCore::GraphicsSurfacePrivate::glxPixmap):
1666 (WebCore::GraphicsSurfacePrivate::size):
1667 (WebCore::GraphicsSurfacePrivate::glContext):
1668 (WebCore::resolveGLMethods):
1669 Initialize all the function pointers for the GL functions used.
1670 (WebCore::GraphicsSurface::platformExport):
1671 (WebCore::GraphicsSurface::platformGetTextureID):
1672 Bind the GLXPixmap to a texture.
1673 (WebCore::GraphicsSurface::platformCopyToGLTexture):
1674 Not beeing implemented for GLX.
1675 (WebCore::GraphicsSurface::platformCopyFromFramebuffer):
1676 Blit origin fbo onto the GraphicsSurface's backing.
1677 (WebCore::GraphicsSurface::platformCreate):
1678 (WebCore::GraphicsSurface::platformImport):
1679 (WebCore::GraphicsSurface::platformLock):
1680 (WebCore::GraphicsSurface::platformUnlock):
1681 (WebCore::GraphicsSurface::platformDestroy):
1683 2012-07-13 Dongwoo Im <dw.im@samsung.com>
1685 CodeGeneratorJS.pm : SetterExpression should use 'push' rather than 'unshift'
1686 https://bugs.webkit.org/show_bug.cgi?id=91198
1688 Reviewed by Kentaro Hara.
1690 'SetterExpression' should use 'push' to make arguments, rather than 'unshift'.
1692 No new tests. Covered by existing tests.
1694 * bindings/scripts/CodeGeneratorJS.pm:
1695 (GenerateImplementation):
1697 2012-07-13 Yoshifumi Inoue <yosin@chromium.org>
1699 REGRESSION(r119948): [Forms] Spin button Up/Down actions make value to zero for input type "number" when step mismatched
1700 https://bugs.webkit.org/show_bug.cgi?id=91197
1702 Reviewed by Kent Tamura.
1704 This patch fixes implementation of Decimal::ceiling() and floor().
1705 They return wrong value for small fractional numbers.
1707 The bug is occurred when:
1708 - Step-able input type, e.g. number, date, datetime, and so on.
1709 - Current value is step mismatched
1710 - Current value is smaller than step
1711 - Step up/down by spin button
1712 because spin button up/down actions are implemented in InputType::setpUpFromRenderer
1713 which calls Decimal::ceiling() and floor() for step mismatched case.
1715 Tests: fast/forms/number/number-stepup-stepdown-from-renderer.html: Added test cases
1716 WebKit/chromium/tests/DecimalTest.cpp: Added test cases
1718 * platform/Decimal.cpp:
1719 (WebCore::Decimal::ceiling): Changed to return 1 for positive small fractional number.
1720 (WebCore::Decimal::floor): Changed to return -1 for negative small fractional number.
1722 2012-07-13 Dominic Mazzoni <dmazzoni@google.com>
1724 Should be possible to focus elements within canvas fallback content
1725 https://bugs.webkit.org/show_bug.cgi?id=87898
1727 Reviewed by Chris Fleizach.
1729 Patches isFocusable in dom/Node.cpp and html/HTMLFormControlElement.cpp
1730 to make elements focusable if they're a descendent of a canvas element
1731 if they would otherwise have been focusable but just didn't have
1732 a renderer. Adds a bit to ElementRareData to efficiently keep track
1733 of elements in a canvas subtree.
1735 Test: fast/canvas/fallback-content.html
1738 (WebCore::Element::attach):
1739 (WebCore::Element::detach):
1740 (WebCore::Element::setIsInCanvasSubtree):
1742 (WebCore::Element::isInCanvasSubtree):
1745 * dom/ElementRareData.h:
1747 (WebCore::ElementRareData::ElementRareData):
1749 (WebCore::Node::isFocusable):
1750 * html/HTMLCanvasElement.cpp:
1751 (WebCore::HTMLCanvasElement::attach):
1753 * html/HTMLCanvasElement.h:
1754 (HTMLCanvasElement):
1755 * html/HTMLFormControlElement.cpp:
1756 (WebCore::HTMLFormControlElement::isFocusable):
1758 2012-07-12 Carlos Garcia Campos <cgarcia@igalia.com>
1760 [GTK] Add API to get HTTPS status to WebKit2 GTK+
1761 https://bugs.webkit.org/show_bug.cgi?id=91100
1763 Reviewed by Martin Robinson.
1765 * platform/network/soup/ResourceResponse.h:
1766 (WebCore::ResourceResponse::soupMessageCertificate): Return the
1768 (WebCore::ResourceResponse::setSoupMessageCertificate): Set a
1770 (WebCore::ResourceResponse::soupMessageTLSErrors): Return the TLS
1772 (WebCore::ResourceResponse::setSoupMessageTLSErrors): Set TLS
1774 * platform/network/soup/ResourceResponseSoup.cpp:
1775 (WebCore::ResourceResponse::toSoupMessage): Set the certificate
1776 and TLS errors to the newly created SoupMessage.
1777 (WebCore::ResourceResponse::updateFromSoupMessage): Get the
1778 certificate and TLS errors from the SoupMessage.
1780 2012-07-13 Ryosuke Niwa <rniwa@webkit.org>
1782 RadioNodeList is not updated upon input type change
1783 https://bugs.webkit.org/show_bug.cgi?id=91178
1785 Reviewed by Alexey Proskuryakov.
1787 Invalidate the radio node lists when type content attribute changes since it excludes
1788 image type input elements.
1790 Test: fast/forms/radionodelist-image-type.html
1793 (WebCore::shouldInvalidateNodeListForType):
1794 * dom/Document.h: Renamed InvalidateOnIdNameForAttrChange to InvalidateOnFormAttrChange
1795 since listing all attribute name isn't useful at this point.
1796 * html/RadioNodeList.cpp:
1797 (WebCore::RadioNodeList::RadioNodeList):
1799 2012-07-12 Dongwoo Im <dw.im@samsung.com>
1801 CodeGeneratorJS.pm need to handle the attribute which has "CallWith=ScriptExecutionContext" option.
1802 https://bugs.webkit.org/show_bug.cgi?id=91185
1804 Reviewed by Kentaro Hara.
1806 When an attribute has "CallWith=ScriptExecutionContext" option, 'ScriptExecutionContext*' parameter should be the last parameter.
1808 No new tests. Covered by existing tests.
1810 * bindings/scripts/CodeGeneratorJS.pm:
1811 (GenerateImplementation):
1813 2012-07-12 Yoshifumi Inoue <yosin@chromium.org>
1815 REGRESSION(r117738): [Forms] stepMismatch for input type "time" with large step value always return false.
1816 https://bugs.webkit.org/show_bug.cgi?id=91062
1818 Reviewed by Kent Tamura.
1820 This patch changes value of StepRange::acceptableError to zero for
1821 integer restricted step value.
1823 No new tests, existing test covers (fast/forms/time/ValidityState-stepMismatch-time.html) this change although they are listed in TestExpectation file.
1825 * html/StepRange.cpp:
1826 (WebCore::StepRange::acceptableError): Changed to return 0 if step value is restricted to be an integer.
1828 2012-07-12 Dan Bernstein <mitz@apple.com>
1830 Pass an option flag to CFStringGetHyphenationLocationBeforeIndex() that tells it to not
1831 terminate the search at the last word boundary before the given index.
1833 Reviewed by Adele Peterson.
1835 No test, because the current version of Core Foundation ignores the options parameter.
1837 * platform/text/cf/HyphenationCF.cpp:
1838 (WebCore::lastHyphenLocation): Changed the options parameter from 0 to 1.
1840 2012-07-12 Eric Seidel <eric@webkit.org>
1842 Incorrect behaviour calling Range setStart or setEnd with boundary in different document
1843 https://bugs.webkit.org/show_bug.cgi?id=42517
1845 Reviewed by Ojan Vafai.
1847 Added a new static inline "checkForDifferentRootContainer" to share some code
1848 and made setStart/setEnd do the right thing in the x-document case. I removed
1849 the bogus checks in set*After/set*Before functions, and since they just call
1850 through to setStart/setEnd, they also now do the right thing.
1852 Test: fast/dom/Range/set-wrong-document-err.html
1855 (WebCore::checkForDifferentRootContainer):
1857 (WebCore::Range::setStart):
1858 (WebCore::Range::setEnd):
1859 (WebCore::Range::setStartAfter):
1860 (WebCore::Range::setEndBefore):
1861 (WebCore::Range::setEndAfter):
1862 (WebCore::Range::setStartBefore):
1864 2012-07-12 Erik Arvidsson <arv@chromium.org>
1866 [V8] Simplify CodeGeneratorV8 since V8OnProto is only true for DOMWindow
1867 https://bugs.webkit.org/show_bug.cgi?id=91165
1869 Reviewed by Nate Chapin.
1871 The old code was dead code since V8OnProto only ever gets set to 1 for DOMWindow.
1873 No new tests. No change in functionality.
1875 * bindings/scripts/CodeGeneratorV8.pm:
1876 (GenerateNormalAttrSetter):
1878 2012-07-12 Ryosuke Niwa <rniwa@webkit.org>
1880 Build fix. Initialize unused const member variables to make compilers happy.
1882 * dom/DynamicNodeList.h:
1883 (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
1885 2012-07-12 Konrad Piascik <kpiascik@rim.com>
1887 Web Inspector: Geolocation override
1888 https://bugs.webkit.org/show_bug.cgi?id=89365
1890 Reviewed by Pavel Feldman.
1892 Reverted original patch.
1893 Change has not been reviewed by the right people. It declares
1894 public protocol methods and is wrong in several ways.
1896 * Modules/geolocation/GeolocationController.cpp:
1897 (WebCore::GeolocationController::GeolocationController):
1898 (WebCore::GeolocationController::positionChanged):
1899 * Modules/geolocation/GeolocationController.h:
1900 (GeolocationController):
1901 * inspector/Inspector.json:
1902 * inspector/InspectorInstrumentation.cpp:
1904 * inspector/InspectorInstrumentation.h:
1906 (InspectorInstrumentation):
1907 * inspector/InspectorPageAgent.cpp:
1908 (WebCore::InspectorPageAgent::InspectorPageAgent):
1909 * inspector/InspectorPageAgent.h:
1910 * inspector/front-end/Settings.js:
1911 * inspector/front-end/SettingsScreen.js:
1912 (WebInspector.UserAgentSettingsTab):
1913 (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement):
1914 * inspector/front-end/UserAgentSupport.js:
1916 2012-07-12 Ryosuke Niwa <rniwa@webkit.org>
1918 Move m_type and m_hasNameCache from HTMLCollectionCacheBase to DynamicNodeListCacheBase for better bit packing
1919 https://bugs.webkit.org/show_bug.cgi?id=91164
1921 Reviewed by Anders Carlsson.
1923 Moved m_type and m_hasNameCache from HTMLCollection and renamed them to m_collectionType and m_isNameCacheValid.
1925 Also renamed shouldIncludeChildren to shouldOnlyIncludeDirectChildren and negated the return value since
1926 all HTMLCollection include children in the collection and the function was meant to tell us whether the collection
1927 should include descendents that are not direct children of base().
1929 In addition, renamed nextNodeOrSibling to nextNode since "or sibling" doesn't seem to add any semantic clarity.
1931 * dom/DynamicNodeList.h:
1932 (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
1933 (DynamicNodeListCacheBase):
1934 (WebCore::DynamicNodeListCacheBase::type):
1935 (WebCore::DynamicNodeListCacheBase::hasNameCache):
1936 (WebCore::DynamicNodeListCacheBase::setHasNameCache):
1937 (WebCore::DynamicNodeListCacheBase::clearCache):
1938 * html/HTMLCollection.cpp:
1939 (WebCore::shouldOnlyIncludeDirectChildren):
1940 (WebCore::HTMLCollection::HTMLCollection):
1941 (WebCore::HTMLCollection::isAcceptableElement):
1942 (WebCore::nextNode):
1943 (WebCore::HTMLCollection::itemAfter):
1944 * html/HTMLCollection.h:
1945 (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
1946 (HTMLCollectionCacheBase):
1947 (WebCore::HTMLCollectionCacheBase::clearCache):
1949 2012-07-12 Shinya Kawanaka <shinyak@chromium.org>
1951 Needs callback before AuthorShadowRoot is added.
1952 https://bugs.webkit.org/show_bug.cgi?id=91167
1954 Reviewed by Hajime Morita.
1956 This is a preliminary patch for adding multiple Shadow DOM support for media elements and form elements.
1957 They assume that UserAgentShadowRoot is the oldest, however currently a page author may try to add
1958 AuthorShadowRoot before adding UserAgentShadowRoot.
1960 This patch adds a callback before AuthorShadowRoot is being added, and allow us to add UserAgentShadowRoot
1961 for those elements. See also Bug 77936, Bug 77937, Bug 90532.
1964 (WebCore::Element::willAddAuthorShadowRoot):
1965 * dom/ElementShadow.cpp:
1966 (WebCore::ElementShadow::addShadowRoot):
1967 * dom/ElementShadow.h:
1969 * dom/ShadowRoot.cpp:
1970 (WebCore::ShadowRoot::create):
1972 2012-07-12 Dana Jansens <danakj@chromium.org>
1974 [chromium] Remove the RenderPass pointer from RenderPassDrawQuad
1975 https://bugs.webkit.org/show_bug.cgi?id=91023
1977 Reviewed by Adrienne Walker.
1979 Removes the RenderPass pointer and keeps only an integer id in the
1980 quad to refer back to the RenderPass the quad reads from.
1982 Covered by existing tests.
1984 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1985 (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1986 (WebCore::findRenderPassById):
1988 (WebCore::removeRenderPassesRecursive):
1989 (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::shouldRemoveRenderPass):
1990 (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::shouldRemoveRenderPass):
1991 (WebCore::CCLayerTreeHostImpl::removeRenderPasses):
1992 (WebCore::CCLayerTreeHostImpl::prepareToDraw):
1993 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1995 (CullRenderPassesWithCachedTextures):
1996 (CullRenderPassesWithNoQuads):
1997 (CCLayerTreeHostImpl):
1998 * platform/graphics/chromium/cc/CCRenderPass.cpp:
1999 (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
2000 * platform/graphics/chromium/cc/CCRenderPass.h:
2002 * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
2003 (WebCore::CCRenderPassDrawQuad::create):
2004 (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
2005 * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
2006 (CCRenderPassDrawQuad):
2007 * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2008 (WebCore::CCRenderSurface::appendQuads):
2009 * platform/graphics/chromium/cc/CCRenderSurface.h:
2012 2012-07-12 Elliott Sprehn <esprehn@gmail.com>
2014 Unneeded tree walking when adding or removing children due to RenderCounter / RenderQuote logic
2015 https://bugs.webkit.org/show_bug.cgi?id=89900
2017 Reviewed by Eric Seidel and Abhishek Arya.
2019 Previously we would walk the all children a renderer whenever adding
2020 or removing a child renderer from its RenderObjectChildList to look for
2021 RenderQuote and RenderCounter instances to update. This patch introduces
2022 a counter in RenderView for the number of RenderQuote and RenderCounter
2023 instances in that document so we can avoid these traversals.
2025 No tests needed since this is just a short circuiting of logic and the existing
2026 tests should cover it.
2028 * rendering/RenderCounter.cpp:
2029 (WebCore::RenderCounter::RenderCounter): Increment instance counter.
2030 (WebCore::RenderCounter::willBeDestroyed): Decrement instance counter.
2032 (WebCore::RenderCounter::rendererRemovedFromTree): Short circuit when counter is zero.
2033 (WebCore::RenderCounter::rendererSubtreeAttached): Short circuit when counter is zero.
2034 * rendering/RenderCounter.h:
2036 * rendering/RenderObjectChildList.cpp:
2037 (WebCore::RenderObjectChildList::removeChildNode): Short circuit calling into Counter and Quote code when the document is being destroyed.
2038 * rendering/RenderQuote.cpp:
2039 (WebCore::RenderQuote::RenderQuote):
2040 (WebCore::RenderQuote::willBeDestroyed):
2042 (WebCore::RenderQuote::rendererSubtreeAttached): Increment instance counter.
2043 (WebCore::RenderQuote::rendererRemovedFromTree): Decrement instance counter.
2044 * rendering/RenderQuote.h:
2046 * rendering/RenderView.cpp:
2047 (WebCore::RenderView::RenderView):
2048 * rendering/RenderView.h: Methods for managing the RenderQuote and RenderCounter counts.
2050 (WebCore::RenderView::addRenderQuote):
2051 (WebCore::RenderView::removeRenderQuote):
2052 (WebCore::RenderView::hasRenderQuotes):
2053 (WebCore::RenderView::addRenderCounter):
2054 (WebCore::RenderView::removeRenderCounter):
2055 (WebCore::RenderView::hasRenderCounters):
2057 2012-07-12 Ryosuke Niwa <rniwa@webkit.org>
2059 Merge HTMLCollectionWithArrayStorage into HTMLCollection
2060 https://bugs.webkit.org/show_bug.cgi?id=91144
2062 Reviewed by Anders Carlsson.
2064 Merged HTMLCollectionWithArrayStorage::item into HTMLCollection::item and got rid of
2065 HTMLCollectionWithArrayStorage. Also de-virtualized HTMLCollection::item and HTMLCollection::length
2066 and merged itemInArrayAfter and itemAfter.
2068 In addition, improved the algorithm in HTMLCollection::length to take advantage of item cache.
2069 Instead of always computing the length from the beginning, we start the search from the cached item
2070 so that if we're near end of the collection, we avoid significant portion of the node traversal.
2072 Furthermore, made HTMLCollection always call setItemCache with a non-null item and HTMLCollection::item
2073 set the length cache when it reaches the end of the collection to avoid redundant length calculations.
2075 * dom/DynamicNodeList.h:
2076 (WebCore::DynamicNodeListCacheBase::setItemCache): Add a FIXME.
2077 * html/HTMLCollection.cpp:
2078 (WebCore::HTMLCollection::itemAfter): Regular HTMLCollection doesn't have uses elements array so
2079 assert that offsetInArray is always 0.
2080 (WebCore): Removed calcLength.
2081 (WebCore::HTMLCollection::length): Rewritten. The algorithm is as follows:
2082 When there is no item cache, we look for the first item by calling item(0). If item(0) returns null,
2083 then it must have set the length cache so bail out. If the previous step didn't bail out, then
2084 the item cache is valid and not null (see above), so count the number of remaining items in collection
2085 starting at the cached item's offset + 1.
2086 (WebCore::HTMLCollection::item): Avoid calling setItemCache with null. When the first item is null,
2087 set the length cache instead.
2088 (WebCore::HTMLCollection::itemAfterCachedItem): Extracted from HTMLCollectionWithArrayStorage::item.
2089 (WebCore::HTMLCollection::namedItem): Pass in arrayOffset to itemAfter. Note this variable is never
2090 used since only HTMLFormCollection and HTMLPropertiesCollection use array offsets but they override
2092 (WebCore::HTMLCollection::updateNameCache): Ditto.
2093 * html/HTMLCollection.h:
2096 * html/HTMLFormCollection.cpp: Removed calcLength(). Even though this function didn't iterate over
2097 the collection directly, HTMLFormElement::length and HTMLFieldSetElement::length did so we're not
2098 regressing any performance here.
2099 (WebCore::HTMLFormCollection::HTMLFormCollection):
2100 (WebCore::HTMLFormCollection::itemAfter):
2101 * html/HTMLFormCollection.h:
2102 (HTMLFormCollection):
2103 * html/HTMLNameCollection.cpp:
2104 (WebCore::HTMLNameCollection::itemAfter):
2105 * html/HTMLNameCollection.h:
2106 (HTMLNameCollection):
2107 * html/HTMLPropertiesCollection.cpp: Removed calcLength().
2108 (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
2109 (WebCore::HTMLPropertiesCollection::itemAfter):
2111 * html/HTMLPropertiesCollection.h:
2112 (HTMLPropertiesCollection):
2113 * html/HTMLTableRowsCollection.cpp:
2114 (WebCore::HTMLTableRowsCollection::itemAfter):
2115 * html/HTMLTableRowsCollection.h:
2116 (HTMLTableRowsCollection):
2118 2012-07-12 Pravin D <pravind.2k4@gmail.com>
2120 Row size/position is wrongly calculated when table having overlapping rowspan cell and colspan cell
2121 https://bugs.webkit.org/show_bug.cgi?id=16811
2123 Reviewed by Julien Chaffraix.
2125 The height of a row is calculated by taking the max height of the cells contained in it. When a row contains
2126 a rowSpan cell and if this row is not the last row of the cell, then its height is max height of other non
2127 rowSpan cells. If the row is the last row of the rowSpan cell, then using the contraint laid by CSS2.1 spec
2128 "For a rowSpan cell, the sum of the row heights involved must be great enough to encompass the cell spanning the rows",
2129 the last remaining height of the rowSpan(cell height minus heights of other involved rows) is taken into consideration
2130 while calculating the height of this row.
2131 Currently when calculating the height of the row we are only using the height of the primary cell at position (row, col).
2132 However when a row has colSpan cell and rowSpan, they might overlap. In such a sitution as only the primary cells height
2133 is considered, the height of the row will be calculated worngly if the other overlapping cell has greater height.
2134 Thus all the overlapping cell at position (row, col) must be considered while calculating the height of a row.
2136 Test: fast/table/last-cell-of-rowspan-overlapping-colspan-cell.html
2138 * rendering/RenderTableSection.cpp:
2139 (WebCore::RenderTableSection::calcRowLogicalHeight):
2140 Fixed function to use all the overlapping cells at position(row, col) to calculate the height/position of rows.
2142 2012-07-12 Joshua Bell <jsbell@chromium.org>
2144 IndexedDB: Enable IDBFactory.deleteDatabase() and webkitGetDatabaseNames() in Workers
2145 https://bugs.webkit.org/show_bug.cgi?id=90310
2147 Reviewed by Tony Chang.
2149 Simplify Document vs. Worker logic for IDBFactory::open() and hook up the
2150 other two IDBFactory methods for use by workers as well.
2152 Test: storage/indexeddb/factory-basics-workers.html
2154 * Modules/indexeddb/IDBFactory.cpp:
2155 (isContextValid): Helper function consolidating checks that context is usable.
2156 (getIndexedDBDatabasePath): Helper function for accessing group settings.
2157 (WebCore::IDBFactory::getDatabaseNames): Simplify - just pass context through to back end.
2158 (WebCore::IDBFactory::open): Ditto.
2159 (WebCore::IDBFactory::deleteDatabase): Ditto.
2160 (WebCore::IDBFactory::cmp): Whitespace.
2161 * Modules/indexeddb/IDBFactoryBackendImpl.cpp: Obsolete openFromWorker() removed.
2162 (WebCore::IDBFactoryBackendImpl::getDatabaseNames): Signature updated.
2163 (WebCore::IDBFactoryBackendImpl::deleteDatabase): Signature updated.
2164 (WebCore::IDBFactoryBackendImpl::open): Signature updated.
2165 * Modules/indexeddb/IDBFactoryBackendImpl.h:
2166 (IDBFactoryBackendImpl):
2167 * Modules/indexeddb/IDBFactoryBackendInterface.h: Interface methods now take both SecurityOrigin
2168 and ScriptExecutionContext, but not Frame. In the proxy, SecurityOrigin is redundant (can be
2169 accessed from context) but on the real back end the context is null (as Frame was previously).
2170 (IDBFactoryBackendInterface):
2171 * inspector/InspectorIndexedDBAgent.cpp:
2173 (WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame):
2174 (WebCore::InspectorIndexedDBAgent::requestDatabase):
2175 (WebCore::InspectorIndexedDBAgent::requestData):
2177 2012-07-12 Dana Jansens <danakj@chromium.org>
2179 [chromium] The root layer should not try create a second RenderSurface for itself
2180 https://bugs.webkit.org/show_bug.cgi?id=91124
2182 Reviewed by Adrienne Walker.
2184 Tests: CCLayerTreeHostImplTest.rootLayerDoesntCreateExtraSurface
2186 * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2187 (WebCore::subtreeShouldRenderToSeparateSurface):
2189 2012-07-12 Adam Barth <abarth@webkit.org>
2191 Regression (r122359) Layout Test html5lib/runner.html is failing
2192 https://bugs.webkit.org/show_bug.cgi?id=91047
2194 Reviewed by Tony Chang.
2196 This ASSERT is bogus because doctypes can be removed from the DOM and
2199 Test: fast/viewport/viewport-legacy-xhtmlmp-remove-and-add.html
2202 (WebCore::Document::setDocType):
2204 2012-07-12 Ojan Vafai <ojan@chromium.org>
2206 Implied minimum size of flex items is min-content
2207 https://bugs.webkit.org/show_bug.cgi?id=87546
2209 Reviewed by Tony Chang.
2211 http://dev.w3.org/csswg/css3-flexbox/#min-size-auto
2212 In the main axis direction, min-size of auto means min-content.
2214 Test: css3/flexbox/flex-item-min-size.html
2216 * rendering/RenderBox.cpp:
2217 (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
2218 (WebCore::RenderBox::computeContentLogicalHeightUsing):
2219 (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
2220 (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
2221 (WebCore::RenderBox::computePositionedLogicalWidthUsing):
2222 (WebCore::RenderBox::computePositionedLogicalHeightUsing):
2223 It turned out that these FIXMEs are all unnecessary with the changes to RenderFlexibleBox.
2225 * rendering/RenderFlexibleBox.cpp:
2226 (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
2227 (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
2229 2012-07-12 Eric Penner <epenner@google.com>
2231 [chromium] Use CCTexture/TextureAllocator and remove TextureManager
2232 https://bugs.webkit.org/show_bug.cgi?id=91001
2234 Reviewed by Adrienne Walker.
2236 Use CCTexture to clean up CCPrioritizedTexture::Backing.
2237 Add TextureAllocator.h and remove remainder of TextureManager.h/cpp.
2238 Minor move/refactoring of link/unlink in CCPrioritizedTexture.
2239 Remove double initialization of the default memory limit.
2241 Covered by existing tests (refactoring).
2244 * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
2245 * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
2247 * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
2248 * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
2250 * platform/graphics/chromium/ImageLayerChromium.cpp:
2251 * platform/graphics/chromium/LayerRendererChromium.cpp:
2252 (WebCore::LayerRendererChromium::initialize):
2253 * platform/graphics/chromium/ManagedTexture.cpp: Removed.
2254 * platform/graphics/chromium/ManagedTexture.h: Removed.
2255 * platform/graphics/chromium/RenderSurfaceChromium.h:
2257 * platform/graphics/chromium/TextureAllocator.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCPriorityCalculator.h.
2260 (WebCore::TextureAllocator::~TextureAllocator):
2261 * platform/graphics/chromium/TextureManager.cpp: Removed.
2262 * platform/graphics/chromium/TextureManager.h: Removed.
2263 * platform/graphics/chromium/TiledLayerChromium.cpp:
2264 * platform/graphics/chromium/TrackingTextureAllocator.cpp:
2265 (WebCore::TrackingTextureAllocator::createTexture):
2266 (WebCore::TrackingTextureAllocator::deleteTexture):
2267 * platform/graphics/chromium/TrackingTextureAllocator.h:
2268 * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
2269 * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2270 (WebCore::CCLayerTreeHost::prioritizeTextures):
2271 * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2273 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2274 (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
2275 * platform/graphics/chromium/cc/CCPrioritizedTexture.cpp:
2276 (WebCore::CCPrioritizedTexture::CCPrioritizedTexture):
2277 (WebCore::CCPrioritizedTexture::setDimensions):
2278 (WebCore::CCPrioritizedTexture::textureId):
2279 (WebCore::CCPrioritizedTexture::bindTexture):
2280 (WebCore::CCPrioritizedTexture::framebufferTexture2D):
2281 (WebCore::CCPrioritizedTexture::link):
2283 (WebCore::CCPrioritizedTexture::unlink):
2284 * platform/graphics/chromium/cc/CCPrioritizedTexture.h:
2286 (WebCore::CCPrioritizedTexture::bytes):
2287 (CCPrioritizedTexture):
2288 (WebCore::CCPrioritizedTexture::haveBackingTexture):
2289 (WebCore::CCPrioritizedTexture::Backing::Backing):
2290 (WebCore::CCPrioritizedTexture::Backing::~Backing):
2291 (WebCore::CCPrioritizedTexture::Backing::owner):
2293 (WebCore::CCPrioritizedTexture::backing):
2294 * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp:
2295 (WebCore::CCPrioritizedTextureManager::prioritizeTextures):
2296 (WebCore::CCPrioritizedTextureManager::requestLate):
2297 (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded):
2298 (WebCore::CCPrioritizedTextureManager::reduceMemory):
2299 (WebCore::CCPrioritizedTextureManager::clearAllMemory):
2300 (WebCore::CCPrioritizedTextureManager::registerTexture):
2301 (WebCore::CCPrioritizedTextureManager::returnBackingTexture):
2302 (WebCore::CCPrioritizedTextureManager::createBacking):
2303 (WebCore::CCPrioritizedTextureManager::destroyBacking):
2304 (WebCore::CCPrioritizedTextureManager::assertInvariants):
2305 * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h:
2306 (CCPrioritizedTextureManager):
2307 (WebCore::CCPrioritizedTextureManager::defaultMemoryAllocationLimit):
2308 (WebCore::CCPrioritizedTextureManager::compareBackings):
2309 * platform/graphics/chromium/cc/CCPriorityCalculator.h:
2310 * platform/graphics/chromium/cc/CCScopedTexture.cpp:
2311 * platform/graphics/chromium/cc/CCScopedTexture.h:
2312 * platform/graphics/chromium/cc/CCTexture.h:
2313 (WebCore::CCTexture::CCTexture):
2314 * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2316 * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
2318 2012-07-12 Ryosuke Niwa <rniwa@webkit.org>
2320 Let XCode have its own way.
2322 * WebCore.xcodeproj/project.pbxproj:
2324 2012-07-12 Julien Chaffraix <jchaffraix@webkit.org>
2326 ASSERT(genChild->isListMarker() || genChild->style()->styleType() == FIRST_LETTER) triggered on flex-box content
2327 https://bugs.webkit.org/show_bug.cgi?id=91003
2329 Reviewed by Abhishek Arya.
2331 Tests: fast/flexbox/assert-generated-deprecated-flexbox.html
2332 fast/flexbox/assert-generated-new-flexbox.html
2334 The issue was that findBeforeAfterParent didn't return the right parent for the flex-box case. This would
2335 make us update the wrong children (and not propagate the style updates properly).
2337 * rendering/RenderObjectChildList.cpp:
2338 (WebCore::findBeforeAfterParent):
2339 Added a check for flex boxes (both deprecated and new).
2341 2012-07-12 Pravin D <pravind.2k4@gmail.com>
2343 Percentage width replaced element in zero percent/fixed width container block incorrectly rendered.
2344 https://bugs.webkit.org/show_bug.cgi?id=9493
2346 Reviewed by Andy Estes.
2348 When the width of the container is zero percent/fixed value then the width of the replaced element must also be zero.
2350 Test: fast/css/percent-width-img-inside-zero-percent-and-fixed-container.html
2352 * rendering/RenderBox.cpp:
2353 (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
2354 When the containing block's available width is zero there can be two cases.
2355 The containing block is floated/positioned in which case the width of the replaced child element must be its instrinsic width.
2356 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
2357 replaced elment must be zero.
2359 2012-07-11 Ryosuke Niwa <rniwa@webkit.org>
2361 invalidateNodeListsCacheAfterAttributeChanged should dynamically figure out which attribute needs invalidation
2362 https://bugs.webkit.org/show_bug.cgi?id=91046
2364 Reviewed by Anders Carlsson.
2366 Added an array of counters (m_nodeListCounts) for each set of attributes (NodeListInvalidationType) node lists care about
2367 to Document, and made DynamicSubtreeNodeList's constructor and destructor increment and decrement these counters via
2368 registerDynamicSubtreeNodeList and unregisterDynamicSubtreeNodeList respectively. shouldInvalidateDynamicSubtreeNodeList,
2369 which is called by invalidateNodeListsCacheAfterAttributeChanged, then use these counters to determine whether a given
2370 attribute change should result in node list invalidations.
2372 Also removed m_numNodeListCaches from TreeScope because this counter has now become redundant with m_nodeListCounts.
2374 * dom/ChildNodeList.cpp:
2375 (WebCore::ChildNodeList::ChildNodeList): Do not invalidate on attribute changes.
2376 * dom/ClassNodeList.cpp:
2377 (WebCore::ClassNodeList::ClassNodeList): Invalidate on class attribute changes.
2379 (WebCore::Document::Document): Initialize m_nodeListCounts.
2380 (WebCore::Document::~Document): Add assertions to make sure m_listsInvalidatedAtDocument, m_nodeListCounts, and
2381 m_collections are all empty.
2382 (WebCore::Document::registerDynamicSubtreeNodeList): This function is now called for all DynamicSubtreeNodeLists supposed
2383 to just ones rooted at the document in order to increment the counter for each invalidation type.
2384 (WebCore::Document::unregisterDynamicSubtreeNodeList): Ditto.
2385 (WebCore::shouldInvalidateDynamicSubtreeNodeListForType): Checks the attribute name against NodeListInvalidationType.
2386 (WebCore::Document::shouldInvalidateDynamicSubtreeNodeList): Returns true if the given attribute name matches the invalidation
2387 type of the existing DynamicSubtreeNodeLists in the document. If the attribute name is not given (used when children change),
2388 then it checks for the existence of any DynamicSubtreeNodeLists. Conceptually, this function can be written as a list of
2389 "if" statements that checks values in m_nodeListCounts and the attribute name. We use "for" loop and switch statement instead
2390 to share logic and detect future addition of values to NodeListInvalidationType.
2392 (Document): Moved RootType and InvalidationType from DynamicNodeListCacheBase and renamed them to NodeListRootType and
2393 NodeListInvalidationType respectively in order to reduce the possibility of future name collisions. Also the invalidation type
2394 now contains 6 values instead of 2.
2395 * dom/DynamicNodeList.cpp:
2397 * dom/DynamicNodeList.h:
2398 (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
2399 (WebCore::DynamicNodeListCacheBase::shouldInvalidateOnAttributeChange):
2400 (WebCore::DynamicNodeListCacheBase::rootType): Added.
2401 (WebCore::DynamicNodeListCacheBase::invalidationType): Added.
2402 (DynamicNodeListCacheBase): Uses 3 bits to store invalidation type now that the number of values have increased from 2 to 6.
2403 (WebCore::DynamicNodeList::DynamicNodeList):
2404 (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList): Call unregisterDynamicSubtreeNodeList.
2405 (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList): Call registerDynamicSubtreeNodeList.
2406 * dom/MicroDataItemList.cpp:
2407 (WebCore::MicroDataItemList::MicroDataItemList): Invalidate on itemscope, itemprop, and itemtype content attribute changes.
2408 * dom/NameNodeList.cpp:
2409 (WebCore::NameNodeList::NameNodeList): Invalidate on name attribute changes.
2411 (WebCore::Node::clearRareData):
2412 (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Replaced the hard coded check list of attributes, by a call
2413 to shouldInvalidateDynamicSubtreeNodeList.
2414 (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Calls shouldInvalidateDynamicSubtreeNodeList.
2415 (WebCore::Node::getElementsByTagName):
2416 (WebCore::Node::getElementsByTagNameNS):
2417 (WebCore::Node::getElementsByName):
2418 (WebCore::Node::getElementsByClassName):
2419 (WebCore::Node::radioNodeList):
2420 (WebCore::NodeRareData::createNodeLists):
2421 * dom/NodeRareData.h:
2422 (WebCore::NodeListsNodeData::adoptTreeScope): Unregister and register node lists in m_tagNodeListCacheNS since all node lists
2423 need to be accounted in m_nodeListCounts.
2424 (WebCore::NodeRareData::ensureNodeLists):
2426 * dom/TagNodeList.cpp:
2427 (WebCore::TagNodeList::TagNodeList): Do not invalidate on any attribute changes.
2428 * dom/TreeScope.cpp:
2429 (WebCore::TreeScope::TreeScope): No longer initializes m_numNodeListCaches since it has been removed.
2431 (TreeScope): Removed m_numNodeListCaches.
2432 * dom/TreeScopeAdopter.cpp:
2433 (WebCore::TreeScopeAdopter::moveTreeToNewScope):
2434 * html/HTMLCollection.h:
2435 (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase): Just pass in DoNotInvalidateOnAttributeChanges for now since
2436 it's never used in HTMLCollections.
2437 * html/LabelableElement.cpp:
2438 (WebCore::LabelableElement::labels):
2439 * html/LabelsNodeList.cpp:
2440 (WebCore::LabelsNodeList::LabelsNodeList): Invalidate on for content attribute changes.
2441 (WebCore::LabelsNodeList::~LabelsNodeList):
2442 * html/RadioNodeList.cpp:
2443 (WebCore::RadioNodeList::RadioNodeList): Invalidate on id, name, and for content attribute changes.
2444 (WebCore::RadioNodeList::~RadioNodeList):
2446 2012-07-12 Gavin Barraclough <barraclough@apple.com>
2448 Threadsafety issues in WebScriptObject
2449 https://bugs.webkit.org/show_bug.cgi?id=90849
2451 Reviewed by Filip Pizlo & Oliver Hunt.
2453 Updated fix for this bug. Taking the JSC API lock from WebScriptObject::release
2454 may not be safe; better to just guard the JSWrapperCache with its own spinlock.
2456 * bindings/objc/WebScriptObject.mm:
2457 (WebCore::getJSWrapper):
2458 - Added spinlock; also retain/autorelease the returned wrapper - it is unsafe
2459 to wait for the caller to do so, due to a race condition vs release removing
2460 the wrapper from the map.
2461 (WebCore::addJSWrapper):
2462 - Take the spinlock guarding the cache.
2463 (WebCore::removeJSWrapper):
2464 - Take the spinlock guarding the cache.
2465 (WebCore::removeJSWrapperIfRetainCountOne):
2466 - Take the spinlock guarding the cache, remove the wrapper if retainCount is one.
2467 (WebCore::createJSWrapper):
2468 - Remove the API lock; this method no longer needs to retain/autorelease (this is
2469 done by getJSWrapper).
2470 (-[WebScriptObject _setImp:originRootObject:rootObject:]):
2471 - Remove the API lock.
2472 (-[WebScriptObject release]):
2473 - Remove the API lock, retainCount check moved into removeJSWrapperIfRetainCountOne.
2475 2012-07-11 David Hyatt <hyatt@apple.com>
2477 https://bugs.webkit.org/show_bug.cgi?id=91000
2478 REGRESSION (r122244): Overflow elements don't shrink as much as they should.
2480 Reviewed by Simon Fraser.
2482 This is a fix for a a regression from https://bugs.webkit.org/show_bug.cgi?id=90646.
2484 I incorrectly analyzed the issue with Robert Hogan's negative margin patch and fooled myself into putting back
2485 in an incorrect minimum width check from long ago.
2487 What should have happened in the test case I patched is that the overflow element should shrink to 0. The issue
2488 with improving the logical top estimate in the previous patch is it made the clear delta become 0. This in turn
2489 exposed a bug in our clearing algorithm with Robert's changes where you could need a relayout even if you didn't
2490 actually move. This issue only occurs because the floats list is getting changed mid-layout because of negative margins.
2492 The patch changes getClearDelta to call setChildNeedsLayout(true) on children whose widths change even when their
2493 positions do not. In effect this dynamic addition of new floats after you have done a layout on the child already means
2494 that you can need to lay out again despite not actually having to move.
2496 To handle this, the code that does the relayout is now called if the child needs a relayout. This is done even if
2497 the logical top estimate matches the final position.
2499 No new tests required, since the test in fast/block/float is now correctly covering the issue.
2501 * rendering/RenderBlock.cpp:
2502 (WebCore::RenderBlock::layoutBlockChild):
2503 (WebCore::RenderBlock::getClearDelta):
2504 * rendering/RenderBox.cpp:
2505 (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
2507 2012-07-12 James Weatherall <wez@chromium.org>
2509 storage tests are flaky (crashing) on windows
2510 https://bugs.webkit.org/show_bug.cgi?id=90469
2512 Reviewed by Kentaro Hara.
2514 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.
2516 This patch is intended to resolve flakiness in the storage tests including:
2517 storage/indexeddb/mozilla/indexes.html
2518 storage/indexeddb/mozilla/key-requirements-inline-and-passed.html
2519 storage/websql/multiple-databases-garbage-collection.html
2521 * bindings/v8/NPV8Object.cpp:
2522 (WebCore::disposeUnderlyingV8Object):
2523 Zero the NPObject's underlying rootObject.
2524 (_NPN_EvaluateHelper):
2525 Add check that the underlying V8 object reference is valid.
2527 2012-07-12 No'am Rosenthal <noam.rosenthal@nokia.com>
2529 Move TextureMapperAnimation and texmap/LayerTransform to platform/graphics
2530 https://bugs.webkit.org/show_bug.cgi?id=91111
2532 Reviewed by Kenneth Rohde Christiansen.
2534 TextureMapperAnimation and LayerTransform are not specific to TextureMapper, and we want
2535 to use them for other purposes as well. Moving them to platform/graphics would make that
2538 No new tests, moving files around.
2540 * GNUmakefile.list.am:
2543 * platform/graphics/GraphicsLayerAnimation.cpp: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp.
2544 * platform/graphics/GraphicsLayerAnimation.h: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.h.
2545 * platform/graphics/GraphicsLayerTransform.cpp: Renamed from Source/WebCore/platform/graphics/texmap/LayerTransform.cpp.
2546 * platform/graphics/GraphicsLayerTransform.h: Renamed from Source/WebCore/platform/graphics/texmap/LayerTransform.h.
2547 * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2548 (WebCore::GraphicsLayerTextureMapper::addAnimation):
2549 * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2550 (GraphicsLayerTextureMapper):
2551 * platform/graphics/texmap/TextureMapperLayer.h:
2552 (TextureMapperLayer):
2553 (WebCore::TextureMapperLayer::setAnimatedTransform):
2554 (WebCore::TextureMapperLayer::setAnimatedOpacity):
2556 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org>
2558 Web Inspector: Simplify UISourceCode code after moving revisions support inside it.
2559 https://bugs.webkit.org/show_bug.cgi?id=91118
2561 Reviewed by Pavel Feldman.
2563 * inspector/front-end/UISourceCode.js:
2564 (WebInspector.UISourceCode.prototype._setContent):
2565 (WebInspector.UISourceCode.prototype.revertToOriginal):
2566 (WebInspector.UISourceCode.prototype.revertAndClearHistory):
2567 (WebInspector.UISourceCode.prototype.contentChanged):
2568 (WebInspector.UISourceCode.prototype.commitWorkingCopy):
2569 (WebInspector.Revision.prototype.revertToThis):
2571 2012-07-12 Allan Sandfeld Jensen <allan.jensen@nokia.com>
2573 Unreviewed. Build fix for r122462.
2575 * platform/qt/MemoryUsageSupportQt.cpp:
2577 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org>
2579 Web Inspector: Remove resources panel edited resources search support.
2580 https://bugs.webkit.org/show_bug.cgi?id=91101
2582 Reviewed by Pavel Feldman.
2584 * inspector/front-end/ResourcesPanel.js:
2585 (WebInspector.ResourcesPanel.prototype.performSearch.callback):
2586 (WebInspector.ResourcesPanel.prototype.performSearch):
2588 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org>
2590 Unreviewed r122460 inspector closure compilation fix follow up.
2592 * inspector/front-end/RevisionHistoryView.js:
2593 (WebInspector.RevisionHistoryView):
2595 2012-07-12 Ilya Tikhonovsky <loislo@chromium.org>
2597 Web Inspector: fix native memory instrumentation code for the bindings instrumentation.
2598 https://bugs.webkit.org/show_bug.cgi?id=91096
2600 The instrumented class has to have instrumentation method which reports class size and type and
2601 the member objects and pointers.
2604 void Node::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
2606 memoryObjectInfo->reportObjectInfo(this, MemoryInstrumentation::DOM); // report object size and type.
2607 TreeShared<Node, ContainerNode>::reportMemoryUsage(memoryObjectInfo); // call base class instrumentation.
2608 ScriptWrappable::reportMemoryUsage(memoryObjectInfo); // call base class instrumentation.
2609 memoryObjectInfo->reportPointer(m_document, MemoryInstrumentation::DOM); // report uninstrumented pointer.
2610 memoryObjectInfo->reportInstrumentedPointer(m_next); // report instrumented pointer.
2611 memoryObjectInfo->reportInstrumentedObject(m_anObject); // report instrumented object.
2614 Reviewed by Pavel Feldman.
2616 Existing tests for native memory instrumentation.
2618 * bindings/v8/DOMDataStore.cpp:
2619 (WebCore::DOMDataStore::reportMemoryUsage):
2620 * bindings/v8/DOMDataStore.h:
2623 * bindings/v8/IntrusiveDOMWrapperMap.h:
2624 (WebCore::ChunkedTable::reportMemoryUsage):
2625 * bindings/v8/ScriptProfiler.cpp:
2626 (WebCore::ScriptProfiler::collectBindingMemoryInfo):
2627 * bindings/v8/V8Binding.cpp:
2628 (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
2629 (WebCore::StringCache::reportMemoryUsage):
2630 * bindings/v8/V8Binding.h:
2633 (V8BindingPerIsolateData):
2634 * bindings/v8/V8DOMMap.h:
2636 (AbstractWeakReferenceMap):
2637 * inspector/InspectorMemoryAgent.cpp:
2640 2012-07-12 Pavel Feldman <pfeldman@chromium.org>
2642 Web Inspector: beautify find bar looks, simplify search update routines.
2643 https://bugs.webkit.org/show_bug.cgi?id=91087
2645 Reviewed by Vsevolod Vlasov.
2647 This change updates the looks to the one on the screenshots and simplifies match count update routines.
2649 * inspector/front-end/SearchController.js:
2650 (WebInspector.SearchController.onMatchesMouseDown):
2651 (WebInspector.SearchController):
2652 (WebInspector.SearchController.prototype.activePanelChanged.performPanelSearch):
2653 (WebInspector.SearchController.prototype.activePanelChanged):
2654 (WebInspector.SearchController.prototype._updateSearchNavigationButtonState):
2655 (WebInspector.SearchController.prototype._updateSearchMatchesCountAndCurrentMatchIndex):
2656 (WebInspector.SearchController.prototype._onKeyDown):
2657 (WebInspector.SearchController.prototype._onInput):
2658 (WebInspector.SearchController.prototype._onNextButtonSearch):
2659 (WebInspector.SearchController.prototype._onPrevButtonSearch):
2660 (WebInspector.SearchController.prototype._performSearch):
2661 * inspector/front-end/inspector.css:
2664 (.toolbar-search-navigation-controls):
2665 (.toolbar-search-navigation):
2666 (.toolbar-search-navigation.enabled:hover):
2667 (.toolbar-search-navigation.enabled, .toolbar-search-navigation.enabled:active):
2669 (.toolbar-search-control):
2670 (.search-results-matches):
2671 (.inspector-footer):
2673 2012-07-12 Joshua Bell <jsbell@chromium.org>
2675 IndexedDB: ASSERT hit calling open from callback in Worker
2676 https://bugs.webkit.org/show_bug.cgi?id=90832
2678 Reviewed by Kentaro Hara.
2680 GroupSettings are used to provide the backing store path in some
2681 ports. Accessing those settings from a Worker was added, but the
2682 access referenced thread startup data that is cleared before the
2683 run loop, so an IDBFactory.open() call executed asynchronously
2684 would dereference a null pointer. Plumb the settings startup
2685 data into the context itself, like all of the other properties.
2687 Test: storage/indexeddb/open-twice-workers.html
2689 * Modules/indexeddb/IDBFactory.cpp:
2690 (WebCore::IDBFactory::open):
2691 * workers/DedicatedWorkerContext.cpp:
2692 (WebCore::DedicatedWorkerContext::DedicatedWorkerContext):
2693 * workers/DedicatedWorkerContext.h:
2694 (WebCore::DedicatedWorkerContext::create):
2695 (DedicatedWorkerContext):
2696 * workers/DedicatedWorkerThread.cpp:
2697 (WebCore::DedicatedWorkerThread::createWorkerContext):
2698 * workers/DedicatedWorkerThread.h:
2699 (DedicatedWorkerThread):
2700 * workers/SharedWorkerContext.cpp:
2701 (WebCore::SharedWorkerContext::SharedWorkerContext):
2702 * workers/SharedWorkerContext.h:
2703 (WebCore::SharedWorkerContext::create):
2704 (SharedWorkerContext):
2705 * workers/SharedWorkerThread.cpp:
2706 (WebCore::SharedWorkerThread::createWorkerContext):
2707 * workers/SharedWorkerThread.h:
2708 (SharedWorkerThread):
2709 * workers/WorkerContext.cpp:
2710 (WebCore::WorkerContext::WorkerContext):
2711 * workers/WorkerContext.h:
2712 (WebCore::WorkerContext::groupSettings):
2714 * workers/WorkerThread.cpp:
2715 (WebCore::WorkerThread::workerThread):
2716 * workers/WorkerThread.h:
2719 2012-07-12 Allan Sandfeld Jensen <allan.jensen@nokia.com>
2721 [Qt] Implement MemoryUsageSupport
2722 https://bugs.webkit.org/show_bug.cgi?id=91094
2724 Reviewed by Adam Barth.
2726 Implements Qt versions of the memory-usage functions using the information we have available
2727 from the various memory systems used in WebKit.
2729 Also gets rid of a redundant indirection in V8GCController.
2732 * bindings/v8/V8GCController.cpp:
2733 (WebCore::V8GCController::gcEpilogue):
2734 (WebCore::V8GCController::checkMemoryUsage):
2735 * platform/qt/MemoryUsageSupportQt.cpp: Added.
2736 (WebCore::mallocMemoryUsage):
2737 (WebCore::memoryUsageKB):
2738 (WebCore::actualMemoryUsageKB):
2739 (WebCore::MemoryUsageSupport::memoryUsageMB):
2740 (WebCore::MemoryUsageSupport::actualMemoryUsageMB):
2741 (WebCore::MemoryUsageSupport::lowMemoryUsageMB):
2742 (WebCore::MemoryUsageSupport::highMemoryUsageMB):
2743 (WebCore::MemoryUsageSupport::highUsageDeltaMB):
2744 (WebCore::MemoryUsageSupport::processMemorySizesInBytes):
2745 * platform/qt/PlatformSupport.h:
2748 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org>
2750 Web Inspector: Revision history view should be updated when uiSourceCodes are removed or replaced.
2751 https://bugs.webkit.org/show_bug.cgi?id=91095
2753 Reviewed by Pavel Feldman.
2755 RevisionHistoryView is now reset in WorkspaceReset event handler.
2756 UISourceCodes are now removed from RevisionHistoryView when uiSourceCode is removed or replace.
2758 * inspector/front-end/RevisionHistoryView.js:
2759 (WebInspector.RevisionHistoryView):
2760 (WebInspector.RevisionHistoryView.prototype._clearHistory):
2761 (WebInspector.RevisionHistoryView.prototype._uiSourceCodeRemoved):
2762 (WebInspector.RevisionHistoryView.prototype._uiSourceCodeReplaced):
2763 * inspector/front-end/ScriptsPanel.js:
2764 (WebInspector.ScriptsPanel.prototype._reset):
2766 2012-07-12 Dongwoo Im <dw.im@samsung.com>
2768 InspectorFileSystemAgent.cpp have to include File.h explicitly
2769 https://bugs.webkit.org/show_bug.cgi?id=91078
2771 Reviewed by Vsevolod Vlasov.
2773 Make sure the InspectorFileSystemAgent.cpp include the File.h by including explicitly.
2775 No new tests. Covered by existing tests.
2777 * inspector/InspectorFileSystemAgent.cpp: Include File.h
2779 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org>
2781 Web Inspector: [Regression] Stale revisions should be removed on navigation.
2782 https://bugs.webkit.org/show_bug.cgi?id=91080
2784 Reviewed by Pavel Feldman.
2786 Moved all the code responsible for script mapping resetting to Workspace.
2787 Stale revisions are removed in Workspace._reset now.
2789 * inspector/front-end/ScriptSnippetModel.js:
2790 (WebInspector.ScriptSnippetModel):
2791 * inspector/front-end/StylesPanel.js:
2792 (WebInspector.StylesUISourceCodeProvider):
2793 (WebInspector.StylesUISourceCodeProvider.prototype._populate):
2794 (WebInspector.StylesUISourceCodeProvider.prototype.reset):
2795 * inspector/front-end/UISourceCode.js:
2796 (WebInspector.UISourceCode.prototype._restoreRevisionHistory):
2797 * inspector/front-end/Workspace.js:
2798 (WebInspector.Workspace):
2799 (WebInspector.Workspace.prototype._reset):
2801 2012-07-12 Andreas Kling <kling@webkit.org>
2803 Make ElementAttributeData a variable-sized object to reduce memory use.
2804 <http://webkit.org/b/88240>
2806 Reviewed by Antti "Obi-Wan" Koivisto.
2808 Take advantage of the fact that we know at ElementAttributeData construction time how many attributes
2809 it needs to accomodate and allocate exactly as much space as needed instead of using a Vector.
2810 For elements that never have their attribute list mutated (the vast majority), this saves a lot of
2811 memory and removes the indirection to Vector<Attribute>'s heap-allocated storage.
2813 Introduced a mutability flag to ElementAttributeData and sprinkled assertions all over to make sure
2814 that nothing tries to mutate an element with a raw attribute array.
2816 When an Element's attribute(s) are mutated, we reconstruct the ElementAttributeData, this time using
2817 a Vector as backing instead. This is triggered when calling Element::mutableAttributeData().
2819 This reduces memory consumption by 3.2MB when viewing the full HTML5 spec at <http://whatwg.org/c/>.
2820 That is a ~35% reduction in DOM attribute memory use.
2822 Furthermore, that page ends up promoting 27% of the elements to mutable attribute storage due to dynamic
2823 adding of "class" attributes. For more static pages, savings are even greater.
2825 Also did away with ElementAttributeData::removeAttribute(name) and do separate index lookup where
2826 needed. Not a big deal but avoids double lookup of attributes when removing them.
2828 * css/PropertySetCSSStyleDeclaration.cpp:
2829 (WebCore::InlineCSSStyleDeclaration::ensureMutablePropertySet):
2831 Call ensureInlineStyle() on the element so we know we have a StylePropertySet to work with.
2832 May cause the creation (and replacement) of a new underlying StylePropertySet on the Element's
2835 * css/StylePropertySet.cpp:
2836 (WebCore::StylePropertySet::adoptCSSOMWrapperFrom):
2838 Added. Allows switching the underlying StylePropertySet object while retaining CSSOM wrapper
2839 identity (web facing behavior.)
2842 (WebCore::Element::detachAttribute):
2843 (WebCore::Element::removeAttribute):
2844 (WebCore::Element::attributes):
2845 (WebCore::Element::setAttributeInternal):
2846 (WebCore::Element::parserSetAttributes):
2847 (WebCore::Element::hasEquivalentAttributes):
2848 (WebCore::Element::setAttributeNode):
2849 (WebCore::Element::removeAttributeNode):
2850 (WebCore::Element::getAttributeNode):
2851 (WebCore::Element::getAttributeNodeNS):
2852 (WebCore::Element::hasAttribute):
2853 (WebCore::Element::hasAttributeNS):
2854 (WebCore::Element::normalizeAttributes):
2855 (WebCore::Element::cloneAttributesFromElement):
2856 (WebCore::Element::createMutableAttributeData):
2858 (WebCore::Element::attributeData):
2860 (WebCore::Element::updatedAttributeData):
2861 (WebCore::Element::ensureAttributeData):
2862 (WebCore::Element::ensureUpdatedAttributeData):
2863 (WebCore::Element::mutableAttributeData):
2865 * dom/ElementAttributeData.cpp:
2866 (WebCore::ElementAttributeData::createImmutable):
2868 (WebCore::ElementAttributeData::ElementAttributeData):
2869 (WebCore::ElementAttributeData::~ElementAttributeData):
2870 (WebCore::ElementAttributeData::attrIfExists):
2871 (WebCore::ElementAttributeData::ensureAttr):
2872 (WebCore::ElementAttributeData::setAttr):
2873 (WebCore::ElementAttributeData::removeAttr):
2874 (WebCore::ElementAttributeData::ensureInlineStyle):
2875 (WebCore::ElementAttributeData::ensureMutableInlineStyle):
2876 (WebCore::ElementAttributeData::destroyInlineStyle):
2877 (WebCore::ElementAttributeData::addAttribute):
2878 (WebCore::ElementAttributeData::removeAttribute):
2879 (WebCore::ElementAttributeData::isEquivalent):
2880 (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
2881 (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
2882 (WebCore::ElementAttributeData::cloneDataFrom):
2883 (WebCore::ElementAttributeData::clearAttributes):
2884 (WebCore::ElementAttributeData::replaceAttribute):
2885 (WebCore::ElementAttributeData::getAttributeNode):
2886 * dom/ElementAttributeData.h:
2887 (WebCore::ElementAttributeData::create):
2888 (ElementAttributeData):
2889 (WebCore::ElementAttributeData::setClass):
2890 (WebCore::ElementAttributeData::setIdForStyleResolution):
2891 (WebCore::ElementAttributeData::inlineStyle):
2892 (WebCore::ElementAttributeData::setAttributeStyle):
2893 (WebCore::ElementAttributeData::reportMemoryUsage):
2894 (WebCore::ElementAttributeData::isMutable):
2895 (WebCore::ElementAttributeData::makeMutable):
2896 (WebCore::ElementAttributeData::length):
2898 (WebCore::ElementAttributeData::isEmpty):
2899 (WebCore::ElementAttributeData::array):
2900 (WebCore::ElementAttributeData::removeAttribute):
2901 (WebCore::ElementAttributeData::getAttributeItem):
2902 (WebCore::ElementAttributeData::getAttributeItemIndex):
2903 (WebCore::ElementAttributeData::attributeItem):
2904 * dom/StyledElement.cpp:
2905 (WebCore::StyledElement::style):
2906 (WebCore::StyledElement::classAttributeChanged):
2907 (WebCore::StyledElement::setInlineStyleProperty):
2908 (WebCore::StyledElement::removeInlineStyleProperty):
2909 (WebCore::StyledElement::addSubresourceAttributeURLs):
2910 * dom/StyledElement.h:
2911 (WebCore::StyledElement::ensureInlineStyle):
2912 * html/parser/HTMLConstructionSite.cpp:
2913 (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
2914 * xml/parser/XMLDocumentParserQt.cpp:
2915 (WebCore::XMLDocumentParser::XMLDocumentParser):
2917 2012-07-12 Florin Malita <fmalita@chromium.org>
2919 Incorrect handling of chained pending resources in SVGUseElement
2920 https://bugs.webkit.org/show_bug.cgi?id=89686
2922 Reviewed by Nikolas Zimmermann.
2924 Currently SVGUseElement builds the shadow tree when the target first
2925 becomes available. This is normally OK, but if the target itself (or
2926 one of its children) is a <use> element with pending resources, then
2927 the shadow expansion only captures the current state of the tree and
2928 never gets updated when the pending resource becomes available.
2930 In order to support arbitrary <use>-on-<use> constructs, this patch
2931 tracks nested <use> dependencies and rebuilds the dependent trees
2932 whenever the target gets updated.
2935 Tests: svg/custom/use-nested-expected.svg
2936 svg/custom/use-nested.svg
2938 * svg/SVGElement.cpp:
2939 (WebCore::SVGElement::removedFrom): removedFrom needs to be called up the inheritance chain
2940 before invoking removeAllElementReferencesForTarget. Otherwise we could end up finding the
2941 element being removed as a valid target in SVGUseElement::buildInstanceTree because its
2942 InDocument flag is not cleared yet.
2943 * svg/SVGUseElement.cpp:
2944 (WebCore::SVGUseElement::~SVGUseElement):
2945 (WebCore::SVGUseElement::clearResourceReferences):
2946 (WebCore::SVGUseElement::buildPendingResource):
2947 (WebCore::SVGUseElement::buildShadowAndInstanceTree):
2948 (WebCore::SVGUseElement::buildInstanceTree):
2949 * svg/SVGUseElement.h:
2951 Track <use> -> <use> dependencies using SVGDocumentExtensions'
2952 m_elementDependencies framework and ensure dependent trees are rebuilt
2953 when the target itself gets rebuilt.
2955 2012-07-12 MORITA Hajime <morrita@google.com>
2957 Typo: ParentTranversalDetails should be ParentTraversalDetails
2958 https://bugs.webkit.org/show_bug.cgi?id=91059
2960 Reviewed by Andreas Kling.
2962 Did a bare rename from ParentTranversalDetails to ParentTraversalDetails
2964 No new tests, just a rename.
2966 * dom/ComposedShadowTreeWalker.cpp:
2967 (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didTraverseInsertionPoint):
2968 (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didTraverseShadowRoot):
2969 (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didFindNode):
2970 (WebCore::ComposedShadowTreeWalker::findParent):
2971 (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents):
2972 (WebCore::ComposedShadowTreeWalker::traverseParent):
2973 (WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree):
2974 (WebCore::ComposedShadowTreeWalker::traverseParentBackToYoungerShadowRootOrHost):
2975 * dom/ComposedShadowTreeWalker.h:
2976 (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::ParentTraversalDetails):
2977 (ComposedShadowTreeWalker):
2978 * dom/NodeRenderingContext.h:
2979 (NodeRenderingContext):
2981 2012-07-11 Antti Koivisto <antti@apple.com>
2983 Failure to dispatch didFinishLoadForFrame if font load fails synchronously
2984 https://bugs.webkit.org/show_bug.cgi?id=91018
2986 Reviewed by Enrica Casucci.
2988 New font loads may be triggered by layout after the document load is complete but before we have dispatched
2989 didFinishLoading for the frame. If the load fails synchronously we might fail to ever invoke
2990 FrameLoader::checkLoadComplete and so fail to dispatch didFinishLoading.
2992 Make sure this doesn't happen by calling FrameLoader::checkLoadComplete explicitly after triggering font loads.
2994 * css/CSSFontSelector.cpp:
2995 (WebCore::CSSFontSelector::beginLoadTimerFired):
2997 2012-07-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2999 Register protocol handler files should be in Modules/protocolhandler
3000 https://bugs.webkit.org/show_bug.cgi?id=90766
3002 Reviewed by Hajime Morita.
3004 The register protocol handler files are now self-contained. This patch is moved to the Modules.
3006 No new tests. Covered by existing tests.
3010 * GNUmakefile.list.am:
3011 * Modules/protocolhandler/NavigatorRegisterProtocolHandler.cpp: Renamed from Source/WebCore/page/NavigatorRegisterProtocolHandler.cpp.
3013 (WebCore::initProtocolHandlerWhitelist):
3014 (WebCore::verifyCustomHandlerURL):
3015 (WebCore::isProtocolWhitelisted):
3016 (WebCore::verifyProtocolHandlerScheme):
3017 (WebCore::NavigatorRegisterProtocolHandler::NavigatorRegisterProtocolHandler):
3018 (WebCore::NavigatorRegisterProtocolHandler::~NavigatorRegisterProtocolHandler):
3019 (WebCore::NavigatorRegisterProtocolHandler::registerProtocolHandler):
3020 (WebCore::customHandlersStateString):
3021 (WebCore::NavigatorRegisterProtocolHandler::isProtocolHandlerRegistered):
3022 (WebCore::NavigatorRegisterProtocolHandler::unregisterProtocolHandler):
3023 * Modules/protocolhandler/NavigatorRegisterProtocolHandler.h: Renamed from Source/WebCore/page/NavigatorRegisterProtocolHandler.h.
3025 (NavigatorRegisterProtocolHandler):
3026 * Modules/protocolhandler/NavigatorRegisterProtocolHandler.idl: Renamed from Source/WebCore/page/NavigatorRegisterProtocolHandler.idl.
3028 * WebCore.gyp/WebCore.gyp:
3031 * WebCore.vcproj/WebCore.vcproj:
3032 * WebCore.vcproj/WebCoreCommon.vsprops:
3033 * WebCore.vcproj/copyForwardingHeaders.cmd:
3034 * WebCore.xcodeproj/project.pbxproj:
3036 2012-07-12 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
3038 [BlackBerry] Cannot use digest proxy auth and NTLM auth at the same time
3039 https://bugs.webkit.org/show_bug.cgi?id=91054
3041 Reviewed by George Staikos.
3043 Added an interface function syncProxyCredential() in class
3044 PageClientBlackBerry, which is responsible to notify WebPageClient
3045 to synchronize proxy credential to the chrome process.
3047 Internally reviewed by Jason Liu <jason.liu@torchmobile.com.cn>
3049 No new tests since there's no functional change.
3051 * platform/blackberry/PageClientBlackBerry.h:
3052 * platform/network/blackberry/NetworkJob.cpp:
3053 (WebCore::NetworkJob::storeCredentials): Remember the accepted proxy
3054 credential and notify webpage client to synchronize it.
3056 2012-07-12 Xingnan Wang <xingnan.wang@intel.com>
3058 [IndexedDB] upperOpen set to true in lowerBound()/lowerOpen set to true in upperBound()
3059 https://bugs.webkit.org/show_bug.cgi?id=90867
3061 Reviewed by Tony Chang.
3063 In the latest W3C spec upperOpen/lowerOpen are set to true in lowerBound()/upperBound(), which
3064 we should keep aligned with.
3066 No new tests - updated storage/indexeddb/keyrange.html to match new behavior.
3068 * Modules/indexeddb/IDBKeyRange.cpp:
3069 (WebCore::IDBKeyRange::lowerBound):
3070 (WebCore::IDBKeyRange::upperBound):
3072 2012-07-12 MORITA Hajime <morrita@google.com>
3074 [Shadow DOM] <video> with <shadow> crashes
3075 https://bugs.webkit.org/show_bug.cgi?id=91055
3077 Reviewed by Kent Tamura.
3079 This is similar to Bug 90480, where an undesired renderer is created by
3080 locating an insertion point on the shadow boundary.
3082 This change adds a guard for such case by cheking whether the
3083 source node of each to-be-created renderer comes from the UA shadow
3084 tree, which is allowed to have a renderer.
3086 Test: fast/dom/shadow/insertion-point-video-crash.html
3088 * html/HTMLMediaElement.cpp:
3089 (WebCore::HTMLMediaElement::childShouldCreateRenderer): Added a check.
3090 (WebCore::HTMLMediaElement::mediaControls): Added const.
3091 (WebCore::HTMLMediaElement::hasMediaControls): Added const.
3092 * html/HTMLMediaElement.h:
3095 2012-07-12 Yoshifumi Inoue <yosin@chromium.org>
3097 REGRESSION(r122184): LocaleMac::currentLocale should use current locale rather than newly create locale object.
3098 https://bugs.webkit.org/show_bug.cgi?id=91057
3100 Reviewed by Kent Tamura.
3102 This patch changes NSLocale object of LocaleMac::m_locale variable to
3103 current NSLocale object rather than newly created NSLocale object from
3106 No new tests. We don't have way to change system preferences from
3107 test scripts and restoring them. To test this patch, we need to do so.
3109 * platform/text/mac/LocaleMac.h:
3110 (LocaleMac): Added a constructor which takes NSLocale object.
3111 * platform/text/mac/LocaleMac.mm:
3112 (WebCore::LocaleMac::LocaleMac): Added a constructor which takes NSLocale object.
3113 (WebCore::LocaleMac::currentLocale): Changed to construct LocaleMac object from NSLocale object rather than locale identifier.
3115 2012-07-11 Carlos Garcia Campos <cgarcia@igalia.com>
3117 [GTK] Add webkit_cookie_manager_set_persistent_storage() to WebKit2 GTK+ API
3118 https://bugs.webkit.org/show_bug.cgi?id=83016
3120 Reviewed by Martin Robinson.
3122 * platform/network/soup/CookieStorageSoup.cpp:
3123 (WebCore::soupCookiesChanged): Do not notify about changes in
3124 other cookie jars than the current one.
3126 2012-07-12 Philip Rogers <pdr@google.com>
3128 Refactor RenderSVGShape bounding box code
3129 https://bugs.webkit.org/show_bug.cgi?id=90655
3131 Reviewed by Nikolas Zimmermann.
3133 RenderSVGShape::objectBoundingBox worked differently than RenderSVGShape::strokeBoundingBox by
3134 not caching the object bounding box and instead computing it on each call. For consistency and
3135 performance objectBoundingBox has been refactored to return a cached value.
3137 createShape has been renamed updateShapeFromElement for understandability. updateShapeFromElement
3138 now updates the internal state of the shape (bounding boxes, etc) from the associated element.
3139 RenderSVGShape::inflateWithStrokeAndMarkerBounds has been merged into
3140 RenderSVGShape::calculateStrokeBoundingBox which is called from updateShapeFromElement.
3142 After this change all bounding box computation is now handled in updateShapeFromElement. Because
3143 subclasses override updateShapeFromElement it will be easy for them to have custom bounding box
3144 code there (as will happen for RenderSVGPath in a followup patch).
3146 strokeBoundingBox and objectBoundingBox are now able to return their cached values immediately
3147 in RenderSVGRect and RenderSVGEllipse instead of checking their fallback state on each call.
3149 Additionally, to save space RenderSVGEllipse and RenderSVGRect now use the m_fillBoundingBox and
3150 m_strokeBoundingBox of RenderSVGShape instead of having their own.
3152 This patch also removes setStrokeAndMarkerBoundingBox that was previously dead code.
3154 No new tests, just a refactoring.
3156 * rendering/svg/RenderSVGEllipse.cpp:
3157 (WebCore::RenderSVGEllipse::updateShapeFromElement):
3159 (WebCore::RenderSVGEllipse::fillShape):
3160 (WebCore::RenderSVGEllipse::strokeShape):
3161 (WebCore::RenderSVGEllipse::shapeDependentStrokeContains):
3162 * rendering/svg/RenderSVGEllipse.h:
3164 (WebCore::RenderSVGEllipse::isEmpty):
3165 * rendering/svg/RenderSVGRect.cpp:
3166 (WebCore::RenderSVGRect::updateShapeFromElement):
3168 (WebCore::RenderSVGRect::fillShape):
3169 (WebCore::RenderSVGRect::strokeShape):
3170 (WebCore::RenderSVGRect::shapeDependentStrokeContains):
3171 (WebCore::RenderSVGRect::shapeDependentFillContains):
3172 * rendering/svg/RenderSVGRect.h:
3174 (WebCore::RenderSVGRect::isEmpty):
3175 * rendering/svg/RenderSVGShape.cpp:
3176 (WebCore::RenderSVGShape::updateShapeFromElement):
3178 (WebCore::RenderSVGShape::layout):
3179 (WebCore::RenderSVGShape::calculateObjectBoundingBox):
3180 (WebCore::RenderSVGShape::calculateStrokeBoundingBox):
3181 (WebCore::RenderSVGShape::updateRepaintBoundingBox):
3182 * rendering/svg/RenderSVGShape.h:
3184 (WebCore::RenderSVGShape::objectBoundingBox):
3185 (WebCore::RenderSVGShape::strokeBoundingBox):
3187 2012-07-12 Kent Tamura <tkent@chromium.org>
3189 Do not save the form state signature if nothing is saved
3190 https://bugs.webkit.org/show_bug.cgi?id=91050
3192 Reviewed by Hajime Morita.
3194 This change will reduce the size of HistoyItem.
3196 Test: fast/forms/state-restore-empty-state.html
3198 * html/FormController.cpp:
3199 (WebCore::FormController::formElementsState):
3200 If stateVector has only the signature string, clear it.
3202 2012-07-11 Mark Rowe <mrowe@apple.com>
3204 <http://webkit.org/b/91051> Fix the Qt Mac build after r122400.
3206 Qt on Mac builds with a deployment target of OS X 10.5. However, it was not been setting
3207 BUILDING_ON_LEOPARD / TARGETING_LEOPARD and thus was falling down code paths in DisplaySleepDisabler.cpp
3208 that were specific to Snow Leopard and newer. After the removal of BUILDING_ON_LEOPARD
3209 and TARGETING_LEOPARD it ended up falling down the correct Leopard-compatible code path,
3210 which revealed that the code made assumptions about which headers had already been included.
3212 * platform/mac/DisplaySleepDisabler.cpp: Include CoreServices/CoreServices.h to pull in
3213 a declaration of UpdateSystemActivity when targeting Leopard.
3215 2012-07-11 Matt Falkenhagen <falken@chromium.org>
3217 Add dialog element feature toggle to InternalSettings
3218 https://bugs.webkit.org/show_bug.cgi?id=90934
3220 Reviewed by Hajime Morita.
3222 This enables layout tests to be written for dialog although the feature is disabled by default.
3224 Tests: fast/dom/HTMLDialogElement/dialog-disabled.html
3225 fast/dom/HTMLDialogElement/dialog-enabled.html
3227 * WebCore.exp.in: Added newly exported symbol.
3228 * testing/InternalSettings.cpp:
3229 (WebCore::InternalSettings::Backup::Backup): Backup dialog feature flag.
3230 (WebCore::InternalSettings::Backup::restoreTo): Restore dialog feature flag.
3231 (WebCore::InternalSettings::setDialogElementEnabled): Added.
3233 * testing/InternalSettings.h: Added support for dialog.
3236 * testing/InternalSettings.idl: Added support for dialog.
3238 2012-07-11 Kent Tamura <tkent@chromium.org>
3240 Accessing width or height of a detached image input element causes crash
3241 https://bugs.webkit.org/show_bug.cgi?id=90885
3243 Reviewed by Kentaro Hara.
3245 Test: fast/forms/image/width-and-height-of-detached-input.html
3247 * html/ImageInputType.cpp:
3248 (WebCore::ImageInputType::height): Add null check for m_imageLoader.
3249 (WebCore::ImageInputType::width): ditto.
3251 2012-07-11 Kent Tamura <tkent@chromium.org>
3253 Do not save state of stateless form controls
3254 https://bugs.webkit.org/show_bug.cgi?id=90964
3256 Reviewed by Hajime Morita.
3258 By Bug 89409, we started to store unmodified form control
3259 state. However we don't need to make such state for the following
3267 Test: fast/forms/state-restore-skip-stateless.html
3269 * html/BaseButtonInputType.cpp:
3270 (WebCore::BaseButtonInputType::shouldSaveAndRestoreFormControlState):
3271 Added. Disable saving state for submit, reset, and button types.
3272 * html/BaseButtonInputType.h:
3273 (BaseButtonInputType): Add shouldSaveAndRestoreFormControlState.
3274 * html/HTMLFormControlElementWithState.h:
3275 (HTMLFormControlElementWithState): Make shouldSaveAndRestoreFormControlState virtual.
3276 * html/HTMLInputElement.cpp:
3277 (WebCore::HTMLInputElement::shouldSaveAndRestoreFormControlState):
3278 Added. Checks InputType::shouldSaveAndRestoreFormControlState first.
3279 * html/HTMLInputElement.h:
3280 (HTMLInputElement): Override shouldSaveAndRestoreFormControlState.
3281 * html/HTMLKeygenElement.cpp:
3282 (WebCore::HTMLKeygenElement::shouldSaveAndRestoreFormControlState)
3283 Added. Disable saving state for <keygen>.:
3284 * html/HTMLKeygenElement.h: Override shouldSaveAndRestoreFormControlState.
3285 * html/InputType.cpp:
3286 (WebCore::InputType::shouldSaveAndRestoreFormControlState):
3287 Added. Enable saving state for all types by default.
3289 (InputType): Add shouldSaveAndRestoreFormControlState.
3290 * html/PasswordInputType.cpp:
3291 (WebCore::PasswordInputType::shouldSaveAndRestoreFormControlState):
3292 Added. Disabled saving state.
3293 (WebCore::PasswordInputType::saveFormControlState):
3294 Because shouldSaveAndRestoreFormControlState() returns false,
3295 saveFormControlState should be never called.
3296 * html/PasswordInputType.h:
3297 (PasswordInputType): Override shouldSaveAndRestoreFormControlState.
3299 2012-07-11 No'am Rosenthal <noam.rosenthal@nokia.com>
3301 Compilation error with GLES2 when using gl2ext.h from ANGLE.
3302 https://bugs.webkit.org/show_bug.cgi?id=91030
3304 Reviewed by Kenneth Russell.
3306 gl2ext.h defines PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG and not
3307 PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC. This is a bug in the original Khronos header,
3308 but we should work around it until fixed headers are integrated.
3311 * platform/graphics/opengl/Extensions3DOpenGLES.h:
3312 (Extensions3DOpenGLES):
3313 Removed the "PROC" suffix to work around the header bug.
3315 2012-07-11 Mark Rowe <mrowe@apple.com>
3317 Attempt to fix the Chromium Mac build after r122400.
3319 * platform/text/cf/HyphenationCF.cpp: Ensure that Chromium only compiles the body of this file if
3320 building for a new enough version of OS X.
3322 2012-07-11 Kent Tamura <tkent@chromium.org>
3324 [Mac] Sort project.pbxproj
3326 * WebCore.xcodeproj/project.pbxproj: Apply Tools/Scripts/sort-Xcode-project-file
3328 2012-07-11 Dan Bernstein <mitz@apple.com>
3330 When a table row height grows because of pagination, not all cells’ heights are adjusted
3331 https://bugs.webkit.org/show_bug.cgi?id=91043
3333 Reviewed by Sam Weinig.
3335 The fix for in bug <http://webkit.org/b/83595> in <http://trac.webkit.org/r113738> made table
3336 rows grow as necessary to fit cells that grow as a result of pagination. But it had two bad
3337 side effects: earlier cells on the row would not grow by the same amount, and later cells on
3338 the row would factor the existing growth into their intrinsic padding.
3340 Test: fast/multicol/table-row-height-increase.html
3342 * rendering/RenderTableSection.cpp:
3343 (WebCore::RenderTableSection::layoutRows): Now when a cell becomes taller than the row height,
3344 the additional height needed is recorded, and the cell is shrunk back to row height. Then
3345 after finishing the row, all cells occurring on the row (including cells spanning it but not
3346 starting on it) are grown by the same amount.
3348 2012-07-11 Mark Rowe <mrowe@apple.com>
3350 <http://webkit.org/b/91024> Build against the latest SDK when targeting older OS X versions.
3352 Reviewed by Dan Bernstein.
3354 The deployment target is already set to the version that we're targeting, and it's that setting
3355 which determines which functionality from the SDK is available to us.
3357 * Configurations/Base.xcconfig:
3359 2012-07-11 Mark Rowe <mrowe@apple.com>
3361 Switch a few cases that care about the SDK over to checking __MAC_OS_X_VERSION_MAX_ALLOWED so that things build.
3363 Part of <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
3365 Reviewed by Filip Pizlo.
3367 * platform/graphics/cg/GraphicsContextCG.cpp: The SDK we're building against determines whether the constant is available.
3368 * platform/mac/EmptyProtocolDefinitions.h: The SDK we're building against determines whether the protocols are declared.
3369 * platform/mac/NSScrollerImpDetails.h: The SDK we're building against determines whether the constants and method are
3371 * platform/mac/SharedTimerMac.mm: The SDK we're building against determines whether the function has already been declared.
3373 2012-07-11 Mark Rowe <mrowe@apple.com>
3375 <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
3377 This removal was handled by a script that translates the relevant macros in to the equivalent checks
3378 using the system availability macros.
3380 Reviewed by Filip Pizlo.
3383 * accessibility/AccessibilityList.h:
3384 * accessibility/AccessibilityTable.h:
3385 * accessibility/mac/AXObjectCacheMac.mm:
3386 * editing/mac/EditorMac.mm:
3387 * loader/MainResourceLoader.cpp:
3388 * loader/MainResourceLoader.h:
3389 * page/AlternativeTextClient.h:
3390 * page/ContextMenuController.cpp:
3391 * page/mac/SettingsMac.mm:
3392 * platform/LocalizedStrings.cpp:
3393 * platform/MemoryPressureHandler.cpp:
3394 * platform/audio/mac/AudioBusMac.mm:
3395 * platform/graphics/Gradient.h: