F4 key should open the picker popup on Windows and Linux
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-10-11  Keishi Hattori  <keishi@webkit.org>
2
3         F4 key should open the picker popup on Windows and Linux
4         https://bugs.webkit.org/show_bug.cgi?id=98754
5
6         Reviewed by Kent Tamura.
7
8         On Windows, F4 key is used to open the combo box popup. We will introduce the same keybinding for picker popups.
9
10         Added test to calendar-picker-key-operations.html, date-suggestion-picker-key-operations.html, time-suggestion-picker-key-operations.html.
11
12         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
13         (WebCore::BaseMultipleFieldsDateAndTimeInputType::handleKeydownEvent): Open picker on F4 key if it is enabled.
14         * rendering/RenderTheme.cpp:
15         (WebCore::RenderTheme::shouldOpenPickerWithF4Key): Returns true if we want to enable the F4 key binding on this platform. Return false for default.
16         (WebCore):
17         * rendering/RenderTheme.h:
18         (RenderTheme):
19         * rendering/RenderThemeChromiumLinux.cpp:
20         (WebCore::RenderThemeChromiumLinux::shouldOpenPickerWithF4Key): Returns true.
21         (WebCore):
22         * rendering/RenderThemeChromiumLinux.h:
23         * rendering/RenderThemeChromiumWin.cpp:
24         (WebCore):
25         (WebCore::RenderThemeChromiumWin::shouldOpenPickerWithF4Key): Returns true.
26         * rendering/RenderThemeChromiumWin.h:
27         (RenderThemeChromiumWin):
28
29 2012-10-11  John J. Barton  <johnjbarton@chromium.org>
30
31         Web Inspector: Zebra stripe the console
32         https://bugs.webkit.org/show_bug.cgi?id=98701
33
34         Reviewed by Pavel Feldman.
35
36         Add .console-message:hover rule to lightly highlight the message line.
37
38         * inspector/front-end/inspector.css:
39         (.console-message:hover):
40
41 2012-10-11  Vsevolod Vlasov  <vsevik@chromium.org>
42
43         Web Inspector: Filter out embedder injected content scripts
44         https://bugs.webkit.org/show_bug.cgi?id=99039
45
46         Reviewed by Yury Semikhatsky.
47
48         * inspector/front-end/NetworkUISourceCodeProvider.js:
49         (WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource):
50
51 2012-10-11  Pavel Feldman  <pfeldman@chromium.org>
52
53         Not reviewed: revert 131004, 131012, 131016, 131042, 131043 for breaking inspector console
54         https://bugs.webkit.org/show_bug.cgi?id=99042
55
56         One can't type in the inspector console after 131004.
57
58         * CMakeLists.txt:
59         * GNUmakefile.list.am:
60         * Target.pri:
61         * WebCore.gypi:
62         * WebCore.vcproj/WebCore.vcproj:
63         * WebCore.xcodeproj/project.pbxproj:
64         * dom/DOMAllInOne.cpp:
65         * dom/Element.cpp:
66         (WebCore::Element::attach):
67         (WebCore::Element::detach):
68         (WebCore::Element::recalcStyle):
69         * dom/Element.h:
70         (WebCore):
71         (Element):
72         * dom/ElementRareData.h:
73         (ElementRareData):
74         * dom/Node.cpp:
75         (WebCore::checkAcceptChild):
76         * dom/Node.h:
77         (Node):
78         * dom/NodeRenderingContext.cpp:
79         (WebCore::NodeRenderingContext::nextRenderer):
80         * dom/PseudoElement.cpp: Removed.
81         * dom/PseudoElement.h: Removed.
82         * rendering/HitTestResult.cpp:
83         (WebCore::HitTestResult::setInnerNode):
84         (WebCore::HitTestResult::setInnerNonSharedNode):
85         * rendering/RenderBlock.cpp:
86         (WebCore::RenderBlock::styleDidChange):
87         (WebCore::RenderBlock::updateBeforeAfterContent):
88         (WebCore):
89         (WebCore::RenderBlock::splitBlocks):
90         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
91         (WebCore::RenderBlock::createReplacementRunIn):
92         (WebCore::RenderBlock::renderName):
93         * rendering/RenderBlock.h:
94         (RenderBlock):
95         * rendering/RenderButton.cpp:
96         (WebCore::RenderButton::updateBeforeAfterContent):
97         (WebCore):
98         * rendering/RenderButton.h:
99         (RenderButton):
100         * rendering/RenderCounter.cpp:
101         (WebCore::RenderCounter::originalText):
102         * rendering/RenderDeprecatedFlexibleBox.cpp:
103         (WebCore::RenderDeprecatedFlexibleBox::renderName):
104         * rendering/RenderGrid.cpp:
105         (WebCore::RenderGrid::renderName):
106         * rendering/RenderInline.cpp:
107         (WebCore::RenderInline::styleDidChange):
108         (WebCore::RenderInline::addChildIgnoringContinuation):
109         (WebCore::RenderInline::splitInlines):
110         (WebCore::RenderInline::renderName):
111         * rendering/RenderListItem.cpp:
112         (WebCore::RenderListItem::updateMarkerLocation):
113         * rendering/RenderMultiColumnBlock.cpp:
114         (WebCore::RenderMultiColumnBlock::renderName):
115         * rendering/RenderObject.cpp:
116         (WebCore::RenderObject::createObject):
117         * rendering/RenderObject.h:
118         (WebCore::RenderObject::generatingNode):
119         * rendering/RenderObjectChildList.cpp:
120         (WebCore):
121         (WebCore::findBeforeAfterParent):
122         (WebCore::RenderObjectChildList::updateBeforeAfterStyle):
123         (WebCore::createRendererForBeforeAfterContent):
124         (WebCore::ensureBeforeAfterContainer):
125         (WebCore::RenderObjectChildList::updateBeforeAfterContent):
126         * rendering/RenderObjectChildList.h:
127         (RenderObjectChildList):
128         * rendering/RenderRubyText.cpp:
129         (WebCore::RenderRubyText::updateBeforeAfterContent):
130         (WebCore):
131         * rendering/RenderRubyText.h:
132         (RenderRubyText):
133         * rendering/RenderTableCell.h:
134         (WebCore::RenderTableCell::renderName):
135         * rendering/RenderTableRow.cpp:
136         (WebCore::RenderTableRow::updateBeforeAndAfterContent):
137         (WebCore):
138         (WebCore::RenderTableRow::styleDidChange):
139         * rendering/RenderTableRow.h:
140         (RenderTableRow):
141         (WebCore::RenderTableRow::renderName):
142         * rendering/RenderTableSection.cpp:
143         (WebCore::RenderTableSection::addChild):
144         * rendering/RenderTableSection.h:
145         (WebCore::RenderTableSection::renderName):
146         * rendering/RenderTreeAsText.cpp:
147         (WebCore::RenderTreeAsText::writeRenderObject):
148
149 2012-10-11  Arpita Bahuguna  <arpitabahuguna@gmail.com>
150
151         REGRESSION (r96393): In some cases, generated content is never shown
152         https://bugs.webkit.org/show_bug.cgi?id=88196
153
154         Reviewed by Antti Koivisto.
155
156         Elements with style specified from an attribute selector in conjunction
157         with a pseudo-element should not take on the shared style of their
158         previous matching sibling (if any).
159
160         The problem here is that an attribute selector appended by a pseudo-element
161         does not return any matched rules for the call (matchesRuleSet(m_uncommonAttributeRuleSet.get()))
162         in StyleResolver::locateSharedStyle().
163
164         This is because of the way pseudo-elements are handled in
165         SelectorChecker::checkSelector(). For a pseudo-element selector we check
166         for the condition (!context.elementStyle && m_mode == ResolvingStyle) and
167         since for this particular flow the SelectorChecker mode is set to ResolvingStyle
168         and since the current element's style is still not available we fail this
169         initial check and return SelectorFailsLocally from checkSelector(). This is
170         incorrect behavior since the element does have an attribute selector specified
171         for it.
172
173         Have thus introduced another enum value: SharingRules for SelectorChecker's Mode.
174         SelectorChecker's mode should be set to SharingRules before making the
175         call to collectMatchingRules() and then reset (back to ResolvingStyle) thereafter.
176
177         Existing Mode value: CollectingRules although appropriate cannot be used in this
178         scenario because we also don't want to set any value to dynamicPseudo for this flow.
179
180         Test: fast/selectors/style-sharing-attribute-selector-with-pseudo-element.html
181
182         * css/SelectorChecker.cpp:
183         (WebCore::SelectorChecker::checkSelector):
184         Added additional check for SelectorChecker's mode: SharingRules when
185         trying to match for the pseudo-element selector.
186
187         * css/SelectorChecker.h:
188         Added SharingRules to Mode enum.
189
190         * css/StyleResolver.cpp:
191         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
192         (WebCore::StyleResolver::locateSharedStyle):
193         * css/StyleResolver.h:
194         (StyleResolver):
195         Renamed matchesRuleSet() to a more descriptive styleSharingCandidateMatchesRuleSet().
196         Also, setting the SelectorChecker's mode to SharingRules before calling
197         on collectMatchingRules() from styleSharingCandidateMatchesRuleSet().
198
199 2012-10-11  Shinya Kawanaka  <shinyak@chromium.org>
200
201         Some shadow roots are not showing up in Inspector.
202         https://bugs.webkit.org/show_bug.cgi?id=88251
203
204         Reviewed by Pavel Feldman.
205
206         When an element has only text node, its shadow root is not showing up in Inspector, since
207         child text is shown in oneline. We had to prevent from inlining child text when a shadow root is
208         added.
209
210         Test: inspector/elements/shadow-root.html
211
212         * inspector/front-end/DOMAgent.js:
213         (WebInspector.DOMNode):
214         (WebInspector.DOMNode.prototype.hasShadowRoots):
215         * inspector/front-end/ElementsTreeOutline.js:
216
217 2012-10-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
218
219         [Qt] More responsive scroll animations
220         https://bugs.webkit.org/show_bug.cgi?id=99016
221
222         Reviewed by Jocelyn Turcotte.
223
224         Changes the scrolling animations so they accelerate faster than they deccelerate,
225         making the animation respond faster to user input.
226
227         * platform/ScrollAnimatorNone.cpp:
228         (WebCore::ScrollAnimatorNone::parametersForScrollGranularity):
229         * platform/ScrollAnimatorNone.h:
230         (ScrollAnimatorNone):
231
232 2012-10-11  Alexander Shalamov  <alexander.shalamov@intel.com>
233
234         [CSS3 Media Queries] Aspect ratio value re-parsed when media query expression is evaluated
235         https://bugs.webkit.org/show_bug.cgi?id=99003
236
237         Reviewed by Kenneth Rohde Christiansen.
238
239         Use CSSAspectRatioValue instead of CSSValueList to store aspect ratio value
240         in order to avoid re-parsing of aspect ratio data during media expression evaluation.
241
242         test: fast/media/w3c/test_media_queries.html
243
244         * css/MediaQueryEvaluator.cpp:
245         (WebCore::compareAspectRatioValue):
246         (WebCore):
247         (WebCore::aspect_ratioMediaFeatureEval):
248         (WebCore::device_aspect_ratioMediaFeatureEval):
249         * css/MediaQueryExp.cpp:
250         (WebCore::MediaQueryExp::MediaQueryExp):
251
252 2012-10-11  Zeno Albisser  <zeno@webkit.org>
253
254         [Qt] Implement GraphicsSurfaceToken to replace uint64_t as token type.
255         https://bugs.webkit.org/show_bug.cgi?id=98501
256
257         Replace the token type for GraphicsSurface with a new class GraphicsSurfaceToken.
258         This is necessary in order to implement GraphicsSurface for Windows.
259         Depending on the platform a GraphicsSurfaceToken might contain a
260         WindowID (Linux/GLX), two IOSurfaceIDs (Mac) or in the future two HANDLEs (Windows).
261         The simple uint64_t is not sufficient anymore, since a single HANDLE in windows
262         can be 64bit already.
263
264         Reviewed by Noam Rosenthal.
265
266         * Target.pri:
267         * platform/graphics/qt/GraphicsContext3DQt.cpp:
268         (GraphicsContext3DPrivate):
269         (WebCore::GraphicsContext3DPrivate::graphicsSurfaceToken):
270         * platform/graphics/surfaces/GraphicsSurface.cpp:
271         (WebCore::GraphicsSurface::create):
272         (WebCore::GraphicsSurface::exportToken):
273         * platform/graphics/surfaces/GraphicsSurface.h:
274         (GraphicsSurface):
275         * platform/graphics/surfaces/GraphicsSurfaceToken.h: Added.
276         (WebCore):
277         (GraphicsSurfaceToken):
278         (WebCore::GraphicsSurfaceToken::GraphicsSurfaceToken):
279         (WebCore::GraphicsSurfaceToken::operator!=):
280         (WebCore::GraphicsSurfaceToken::isValid):
281         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
282         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
283         (WebCore::GraphicsSurfacePrivate::token):
284         (GraphicsSurfacePrivate):
285         (WebCore::GraphicsSurface::platformExport):
286         (WebCore::GraphicsSurface::platformImport):
287         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
288         (WebCore::GraphicsSurface::platformExport):
289         (WebCore::GraphicsSurface::platformImport):
290         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
291         (WebCore::TextureMapperSurfaceBackingStore::setGraphicsSurface):
292         (WebCore::TextureMapperSurfaceBackingStore::setSurface):
293         * platform/graphics/texmap/TextureMapperBackingStore.h:
294         (TextureMapperSurfaceBackingStore):
295         (WebCore::TextureMapperSurfaceBackingStore::TextureMapperSurfaceBackingStore):
296         * platform/graphics/texmap/TextureMapperPlatformLayer.h:
297         (WebCore::TextureMapperPlatformLayer::graphicsSurfaceToken):
298
299 2012-10-11  Alexander Pavlov  <apavlov@chromium.org>
300
301         Web Inspector: [Elements] Breadcrumbs are not updated upon involved elements' className changes
302         https://bugs.webkit.org/show_bug.cgi?id=98887
303
304         Reviewed by Vsevolod Vlasov.
305
306         Breadcrumbs should be updated upon the "class" and "id" attribute changes of elements participating in the breadcrumb path.
307
308         Test: inspector/elements/breadcrumb-updates.html
309
310         * inspector/front-end/ElementsPanel.js:
311         (WebInspector.ElementsPanel):
312         (WebInspector.ElementsPanel.prototype._updateBreadcrumbIfNeeded):
313
314 2012-10-11  Kunihiko Sakamoto  <ksakamoto@chromium.org>
315
316         Final newline (LF or CRLF) in paste buffer is converted to space
317         https://bugs.webkit.org/show_bug.cgi?id=80838
318
319         Reviewed by Ryosuke Niwa.
320
321         Currently newline characters are replaced with spaces when pasted
322         to text input. This behavior was introduced in r37539, with the
323         intention to follow the FireFox's behavior (see
324         https://bugs.webkit.org/show_bug.cgi?id=20461). However, FireFox
325         truncates newlines at the end of pasted text, instead of replacing
326         them with spaces. So this patch changes TextFieldInputType to cut
327         trailing newlines of inserted text.
328
329         Test: fast/forms/paste-multiline-text-input.html
330
331         * html/TextFieldInputType.cpp:
332         (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
333         Truncates trailing newlines.
334
335 2012-10-11  Kent Tamura  <tkent@chromium.org>
336
337         Introduce Localizer::isRTL, and use it in DateTimeChooserImpl
338         https://bugs.webkit.org/show_bug.cgi?id=98992
339
340         * platform/text/LocaleICU.cpp:
341         (WebCore::LocaleICU::isRTL): Need to initialize 'status'.
342
343 2012-10-11  Eugene Klyuchnikov  <eustas.bug@gmail.com>
344
345         Web Inspector: The 'X' of the close button of Settings view is not centered
346         https://bugs.webkit.org/show_bug.cgi?id=99008
347
348         Reviewed by Alexander Pavlov.
349
350         Fixed text positioning in CSS.
351
352         * inspector/front-end/helpScreen.css:
353         (.help-close-button):
354
355 2012-10-11  Kent Tamura  <tkent@chromium.org>
356
357         Introduce Localizer::isRTL, and use it in DateTimeChooserImpl
358         https://bugs.webkit.org/show_bug.cgi?id=98992
359
360         Reviewed by Kentaro Hara.
361
362         - Move the RTL detection code in
363           WebKit/chromium/src/DateTimeChooserImpl.cpp to LocaleWin::isRTL()
364         - Introduce Localizer::isRTL as a pure virtual function
365         - Implement LocaleMac::isRTL with native API
366         - Implement LocaleICU::isRTL with ICU API
367         - Add dummy implementation: LocaleNone::isRTL
368
369         Add some tests to WebKit/chromium/tests/.
370
371         * platform/text/Localizer.h:
372         (Localizer): Declare pure virtual isRTL.
373
374         * platform/text/LocaleICU.h:
375         (LocaleICU): Declare isRTL.
376         * platform/text/LocaleICU.cpp:
377         (WebCore::LocaleICU::isRTL): Implemented with uloc_getCharacterOrientation.
378
379         * platform/text/LocaleNone.cpp:
380         (LocaleNone): Declare isRTL.
381         (WebCore::LocaleNone::isRTL): Added.
382
383         * platform/text/LocaleWin.h:
384         (LocaleWin): Declare isRTL.
385         * platform/text/LocaleWin.cpp:
386         (WebCore::LocaleWin::isRTL): Implemented.
387
388         * platform/text/mac/LocaleMac.h:
389         (LocaleMac): Declare isRTL.
390         * platform/text/mac/LocaleMac.mm:
391         (WebCore::LocaleMac::isRTL): Implemented.
392
393 2012-10-11  Vsevolod Vlasov  <vsevik@chromium.org>
394
395         Web Inspector: TypeError in ConsoleMessage.js
396         https://bugs.webkit.org/show_bug.cgi?id=98999
397
398         Reviewed by Alexander Pavlov.
399
400         This patch is based on patch by John J. Barton.
401         Added a check that stack length is equal.
402
403         * inspector/front-end/ConsoleMessage.js:
404         (WebInspector.ConsoleMessageImpl.prototype.isEqual):
405
406 2012-10-10  Jer Noble  <jer.noble@apple.com>
407
408         Disallow full screen mode keyboard access by default.
409         https://bugs.webkit.org/show_bug.cgi?id=98971
410         <rdar://problem/12474226>
411
412         Reviewed by Sam Weinig.
413
414         Fall back to requesting non-keyboard access if the client refuses to allow keyboard access.
415
416         * dom/Document.cpp:
417         (WebCore::Document::requestFullScreenForElement):
418
419 2012-10-10  Ilya Tikhonovsky  <loislo@chromium.org>
420
421         Web Inspector: NMI instrument HTMLCanvas element.
422         https://bugs.webkit.org/show_bug.cgi?id=98917
423
424         Reviewed by Yury Semikhatsky.
425
426         It also includes non intrusive instrumentation for skia classes.
427
428         Test: inspector/profiler/memory-instrumentation-canvas.html
429
430         * WebCore.gypi:
431         * html/HTMLCanvasElement.cpp:
432         (WebCore::HTMLCanvasElement::reportMemoryUsage):
433         (WebCore):
434         * html/HTMLCanvasElement.h:
435         (HTMLCanvasElement):
436         * platform/graphics/ImageBuffer.cpp:
437         (WebCore::ImageBuffer::reportMemoryUsage):
438         (WebCore):
439         * platform/graphics/ImageBuffer.h:
440         (ImageBuffer):
441         * platform/graphics/chromium/ImageBufferDataSkia.h:
442         (ImageBufferData):
443         * platform/graphics/skia/ImageBufferSkia.cpp:
444         (WebCore::ImageBufferData::reportMemoryUsage):
445         (WebCore):
446         * platform/graphics/skia/MemoryInstrumentationSkia.cpp: Copied from Source/WebCore/platform/graphics/chromium/ImageBufferDataSkia.h.
447         (reportMemoryUsage):
448         * platform/graphics/skia/MemoryInstrumentationSkia.h: Copied from Source/WebCore/platform/graphics/chromium/ImageBufferDataSkia.h.
449         * platform/graphics/skia/NativeImageSkia.cpp:
450
451 2012-10-10  Mike West  <mkwst@google.com>
452
453         Document calls createElement with the wrong parameters.
454         https://bugs.webkit.org/show_bug.cgi?id=98907
455
456         Reviewed by Kent Tamura.
457
458         Document::importNode calls Document::createElement with a QualifiedName
459         and ExceptionCode. The Document::createElement that takes a
460         QualifiedName doesn't generate an exception; the second argument is a
461         bool, which the ExceptionCode autocasts into.
462
463         Changing the argument to an explicit bool shouldn't have any visible
464         effect; no new tests are required.
465
466         * dom/Document.cpp:
467         (WebCore::Document::importNode):
468
469 2012-10-10  Lianghui Chen  <liachen@rim.com>
470
471         [BlackBerry] Fix assertion in NetworkJob::notifyChallengeResult.
472         https://bugs.webkit.org/show_bug.cgi?id=97397
473         Internal PR: 186597.
474
475         Internally reviewed by Yong Li, Joe Mason.
476         Reviewed by George Staikos.
477
478         Add a singleton AuthenticationChallengeManager to manage authentication
479         challenge dialog. It does following things:
480         Record page creation/deletion, so it knows what page is present or not.
481         Record page visibility change so it knows when to display a dialog or not.
482         Accept authentication challenge, and decide whether to postpone the
483             challenge dialog based on whether there is active authentication challenge
484             dialog already and whether its page is visible or not.
485         When a challenge result comes back, notify the result to all clients
486             authenticating for the same protection space, and then start the next
487             authentication challenge from the same page, if there is one.
488         When a page becomes visible, start the first authentication challenge
489             dialog that has been blocked before.
490         When an authentication challenge is requested, the NetworkJob will be
491             deferred so its initial response will be saved while waiting for
492             user decision on the challenge.
493
494         No new tests for platform specific internal change.
495
496         * PlatformBlackBerry.cmake:
497         * platform/blackberry/AuthenticationChallengeManager.cpp: Added.
498         (WebCore):
499         (ChallengeInfo):
500         (WebCore::ChallengeInfo::ChallengeInfo):
501         (AuthenticationChallengeManagerPrivate):
502         (WebCore::AuthenticationChallengeManagerPrivate::AuthenticationChallengeManagerPrivate):
503         (WebCore::AuthenticationChallengeManagerPrivate::resumeAuthenticationChallenge):
504         (WebCore::AuthenticationChallengeManagerPrivate::startAuthenticationChallenge):
505         (WebCore::AuthenticationChallengeManagerPrivate::pageExists):
506         (WebCore::AuthenticationChallengeManager::AuthenticationChallengeManager):
507         (WebCore::AuthenticationChallengeManager::pageCreated):
508         (WebCore::AuthenticationChallengeManager::pageDeleted):
509         (WebCore::AuthenticationChallengeManager::pageVisibilityChanged):
510         (WebCore::AuthenticationChallengeManager::authenticationChallenge):
511         (WebCore::AuthenticationChallengeManager::cancelAuthenticationChallenge):
512         (WebCore::AuthenticationChallengeManager::notifyChallengeResult):
513         (WebCore::AuthenticationChallengeManager::instance):
514         (WebCore::AuthenticationChallengeManager::init):
515         * platform/blackberry/AuthenticationChallengeManager.h:
516         (WebCore):
517         (AuthenticationChallengeManager):
518         * platform/blackberry/PageClientBlackBerry.h:
519         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
520         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
521         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
522         (WebCore::MediaPlayerPrivate::onAuthenticationNeeded):
523         (WebCore::MediaPlayerPrivate::notifyChallengeResult):
524         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
525         (MediaPlayerPrivate):
526         * platform/network/blackberry/NetworkJob.cpp:
527         (WebCore::NetworkJob::NetworkJob):
528         (WebCore::NetworkJob::~NetworkJob):
529         (WebCore):
530         (WebCore::NetworkJob::handleNotifyStatusReceived):
531         (WebCore::NetworkJob::handleNotifyClose):
532         (WebCore::NetworkJob::shouldReleaseClientResource):
533         (WebCore::NetworkJob::sendRequestWithCredentials):
534         (WebCore::NetworkJob::notifyChallengeResult):
535         * platform/network/blackberry/NetworkJob.h:
536         (NetworkJob):
537
538 2012-10-10  Simon Fraser  <simon.fraser@apple.com>
539
540         compositing/tiling/crash-reparent-tiled-layer.html is flakey
541         https://bugs.webkit.org/show_bug.cgi?id=82546
542
543         Reviewed by Beth Dakin.
544
545         When calling layerTreeAsText() inside the document load event,
546         GraphicsLayerCA may have not flushed layers yet, so layer tree
547         properties that are affected by flushing (tiled layer, visible
548         rects) appeared flakey in tests.
549         
550         Fix by forcing a flush before dumping the layer tree.        
551         
552         * rendering/RenderLayerCompositor.cpp:
553         (WebCore::RenderLayerCompositor::layerTreeAsText):
554
555 2012-10-10  Beth Dakin  <bdakin@apple.com>
556
557         https://bugs.webkit.org/show_bug.cgi?id=98984
558         REGRESSION: Crash happens after we add non-top-level frame to the 
559         ScrollingStateTree
560
561         Reviewed by Simon Fraser.
562
563         isRootLayer() can return true for layers that do not correspond to 
564         the main frame. But we only want the ones that DO correspond to the 
565         main frame!
566         * rendering/RenderLayerCompositor.cpp:
567         (WebCore::RenderLayerCompositor::updateBacking):
568
569 2012-10-10  Dan Bernstein  <mitz@apple.com>
570
571         <rdar://problem/12472460> text-combine doesn’t use third- and quarter-width variants when used with @font-face
572         https://bugs.webkit.org/show_bug.cgi?id=98961
573
574         Reviewed by Tim Horton.
575
576         Test: fast/text/text-combine-with-font-face.html
577
578         * css/CSSSegmentedFontFace.cpp:
579         (WebCore::CSSSegmentedFontFace::getFontData): Added the width variant to the
580         key used for entries in the font data table, so that we can return different
581         font data for different width variants.
582         * platform/graphics/FontWidthVariant.h: Defined FontWidthVariantWidth for
583         use in the computation of the above key.
584         * rendering/RenderCombineText.cpp:
585         (WebCore::RenderCombineText::combineText): Added a local variable to store
586         the font selector before changing the font description. Previously, by the time
587         we tried to get the font selector from the font, it had already been cleared,
588         so we called Font::update() with a 0 font selector, meaning @font-face fonts
589         could not be selected.
590
591 2012-10-10  Elliott Sprehn  <esprehn@chromium.org>
592
593         Move :before and :after into the DOM        
594         https://bugs.webkit.org/show_bug.cgi?id=95117
595
596         Reviewed by Eric Seidel.
597
598         Reimplement generated content :before and :after as DOM Elements. Now ElementRareData has
599         two RefPtrs to PseudoElements for the generated content and Node has methods for traversing
600         the tree including generated content.
601
602         This allows the generated content to be treated as real nodes instead of anonymous and take
603         part in the usual recalcStyle and attach flow which fixes many bugs and vastly simplifies the
604         lifecycle of generated content.
605
606         No new tests needed for now.
607
608         * CMakeLists.txt:
609         * GNUmakefile.list.am:
610         * Target.pri:
611         * WebCore.gypi:
612         * WebCore.vcproj/WebCore.vcproj:
613         * WebCore.xcodeproj/project.pbxproj:
614         * dom/DOMAllInOne.cpp:
615         * dom/Element.cpp:
616         (WebCore::Element::attach): Add generated content if needed.
617         (WebCore::Element::detach): Remove all child generated content.
618         (WebCore::Element::recalcStyle): Add or remove generated content based on the new style.
619         (WebCore::Element::updatePseudoElement): Updates pseudo content based on a pseudoId.
620         (WebCore):
621         (WebCore::Element::createPseudoElementIfNeeded):
622         (WebCore::Element::beforePseudoElement):
623         (WebCore::Element::afterPseudoElement):
624         * dom/Element.h:
625         (WebCore):
626         (Element):
627         * dom/ElementRareData.h:
628         (ElementRareData):
629         (WebCore::ElementRareData::setPseudoElement):
630         (WebCore):
631         (WebCore::ElementRareData::pseudoElement):
632         * dom/Node.cpp:
633         (WebCore::Node::pseudoAwarePreviousSibling):
634         (WebCore):
635         (WebCore::Node::pseudoAwareNextSibling):
636         (WebCore::checkAcceptChild): Forbid moving PseudoElements for sanity. The code never does this.
637         * dom/Node.h:
638         (Node):
639         (WebCore::Node::isPseudoElement):
640         (WebCore::Node::pseudoId): Fast path that only calls virtualPseudoId if the node has custom callbacks so isPseudoElement is fast.
641         (WebCore::Node::virtualPseudoId):
642         (WebCore::Node::isBeforePseudoElement):
643         (WebCore::Node::isAfterPseudoElement):
644         * dom/NodeRenderingContext.cpp:
645         (WebCore::NodeRenderingContext::nextRenderer): Changed to find the next sibling of pseudos for insertion.
646         * dom/PseudoElement.cpp: Added.
647         (WebCore):
648         (WebCore::pseudoElementName):
649         (WebCore::PseudoElement::PseudoElement):
650         (WebCore::PseudoElement::pseudoRendererIsNeeded):
651         (WebCore::PseudoElement::customStyleForRenderer):
652         (WebCore::PseudoElement::attach):
653         (WebCore::PseudoElement::rendererIsNeeded):
654         (WebCore::PseudoElement::updateChildStyle): Propagates the style downward into the anonymous renderers for the content.
655         (WebCore::PseudoElement::didRecalcStyle):
656         (WebCore::PseudoElement::createRendererForContent): Refactored from RenderObjectChildList.
657         * dom/PseudoElement.h: Added.
658         (WebCore):
659         (PseudoElement):
660         (WebCore::PseudoElement::create):
661         (WebCore::toPseudoElement):
662         * rendering/HitTestResult.cpp:
663         (WebCore::HitTestResult::setInnerNode): Hit testing a PseudoElement should really hit the parent.
664         (WebCore::HitTestResult::setInnerNonSharedNode): Same as above.
665         * rendering/RenderBlock.cpp:
666         (WebCore::RenderBlock::styleDidChange): Remove old generated content code, same for below.
667         (WebCore::RenderBlock::splitBlocks):
668         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
669         (WebCore::RenderBlock::createReplacementRunIn):
670         (WebCore::RenderBlock::renderName):
671         * rendering/RenderBlock.h:
672         (RenderBlock):
673         * rendering/RenderButton.cpp:
674         * rendering/RenderButton.h:
675         (RenderButton):
676         * rendering/RenderCounter.cpp:
677         (WebCore::RenderCounter::originalText):
678         * rendering/RenderDeprecatedFlexibleBox.cpp:
679         (WebCore::RenderDeprecatedFlexibleBox::renderName):
680         * rendering/RenderGrid.cpp:
681         (WebCore::RenderGrid::renderName):
682         * rendering/RenderInline.cpp:
683         (WebCore::RenderInline::styleDidChange):
684         (WebCore::RenderInline::addChildIgnoringContinuation):
685         (WebCore::RenderInline::splitInlines):
686         (WebCore::RenderInline::renderName):
687         * rendering/RenderListItem.cpp:
688         (WebCore::RenderListItem::updateMarkerLocation):
689         * rendering/RenderMultiColumnBlock.cpp:
690         (WebCore::RenderMultiColumnBlock::renderName):
691         * rendering/RenderObject.cpp:
692         (WebCore::RenderObject::createObject):
693         * rendering/RenderObject.h:
694         (WebCore::RenderObject::isPseudoElement):
695         (RenderObject):
696         (WebCore::RenderObject::generatingNode):
697         * rendering/RenderObjectChildList.cpp:
698         * rendering/RenderObjectChildList.h:
699         (RenderObjectChildList):
700         * rendering/RenderRubyText.cpp:
701         * rendering/RenderRubyText.h:
702         (RenderRubyText):
703         * rendering/RenderTableCell.h:
704         (WebCore::RenderTableCell::renderName):
705         * rendering/RenderTableRow.cpp:
706         (WebCore::RenderTableRow::styleDidChange):
707         * rendering/RenderTableRow.h:
708         (WebCore::RenderTableRow::renderName):
709         * rendering/RenderTableSection.cpp:
710         (WebCore::RenderTableSection::addChild):
711         * rendering/RenderTableSection.h:
712         (WebCore::RenderTableSection::renderName):
713         * rendering/RenderTreeAsText.cpp:
714         (WebCore::RenderTreeAsText::writeRenderObject):
715
716 2012-10-10  Sam Weinig  <sam@webkit.org>
717
718         Add more Objective-C WebKit2 DOM API skeletons.
719         https://bugs.webkit.org/show_bug.cgi?id=98981
720
721         Reviewed by Anders Carlsson.
722
723         * WebCore.exp.in:
724         Add necessary export.
725
726 2012-10-10  Dimitri Glazkov  <dglazkov@chromium.org>
727
728         Minimize the recent template explosion in SelectorChecker.
729         https://bugs.webkit.org/show_bug.cgi?id=98829
730
731         Reviewed by Antti Koivisto.
732
733         We've recently added the capability to switch sibling traversal strategy to SelectorChecker, at some readability/clarity expense.
734         This patch tries to minimize the surface of this expense to SelectorChecker::checkOneSelector. 
735
736         No new tests, no change in behavior.
737
738         * css/SelectorChecker.cpp:
739         (WebCore::SelectorChecker::checkSelector): Turned back into a function.
740         (WebCore::SelectorChecker::checkOneSelector): Changed to specialize on traversal strategy, rather than the context, which was less clear.
741         (WebCore::SelectorChecker::DOMTraversalStrategy::isFirstChild): Turned into a function.
742         (WebCore::SelectorChecker::DOMTraversalStrategy::isLastChild): Ditto.
743         (WebCore::SelectorChecker::DOMTraversalStrategy::isFirstOfType): Ditto.
744         (WebCore::SelectorChecker::DOMTraversalStrategy::isLastOfType): Ditto.
745         (WebCore::SelectorChecker::DOMTraversalStrategy::countElementsBefore): Ditto.
746         (WebCore::SelectorChecker::DOMTraversalStrategy::countElementsOfTypeBefore): Ditto.
747         (WebCore::SelectorChecker::DOMTraversalStrategy::countElementsAfter): Ditto.
748         (WebCore::SelectorChecker::DOMTraversalStrategy::countElementsOfTypeAfter): Ditto.
749         * css/SelectorChecker.h:
750         (DOMTraversalStrategy): Changed into a class, rather than a template.
751         (SelectorChecker): Turned back into a function.
752
753 2012-10-10  James Simonsen  <simonjam@chromium.org>
754
755         High res times should start at 0
756         https://bugs.webkit.org/show_bug.cgi?id=84912
757
758         Reviewed by Tony Gentilcore.
759
760         Test: Existing Navigation Timing tests.
761
762         * inspector/InspectorInstrumentation.cpp: Use legacy document time, pending 98223.
763         (WebCore):
764         (WebCore::InspectorInstrumentation::didFinishLoadingImpl):
765         * inspector/InspectorResourceAgent.cpp:
766         (WebCore::buildObjectForTiming):
767         * loader/DocumentLoadTiming.cpp:
768         (WebCore::DocumentLoadTiming::convertMonotonicTimeToLegacyDocumentTime):
769         (WebCore):
770         (WebCore::DocumentLoadTiming::convertMonotonicTimeToZeroBasedDocumentTime):
771         (WebCore::DocumentLoadTiming::markNavigationStart):
772         * loader/DocumentLoadTiming.h:
773         (DocumentLoadTiming):
774         (WebCore::DocumentLoadTiming::navigationStart): These just report raw monotonic times now.
775         (WebCore::DocumentLoadTiming::unloadEventStart):
776         (WebCore::DocumentLoadTiming::unloadEventEnd):
777         (WebCore::DocumentLoadTiming::redirectStart):
778         (WebCore::DocumentLoadTiming::redirectEnd):
779         (WebCore::DocumentLoadTiming::fetchStart):
780         (WebCore::DocumentLoadTiming::responseEnd):
781         (WebCore::DocumentLoadTiming::loadEventStart):
782         (WebCore::DocumentLoadTiming::loadEventEnd):
783         * page/PerformanceTiming.cpp:
784         (WebCore::PerformanceTiming::navigationStart): Convert these back to legacy document times.
785         (WebCore::PerformanceTiming::unloadEventStart):
786         (WebCore::PerformanceTiming::unloadEventEnd):
787         (WebCore::PerformanceTiming::redirectStart):
788         (WebCore::PerformanceTiming::redirectEnd):
789         (WebCore::PerformanceTiming::fetchStart):
790         (WebCore::PerformanceTiming::responseEnd):
791         (WebCore::PerformanceTiming::loadEventStart):
792         (WebCore::PerformanceTiming::loadEventEnd):
793         (WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute):
794         (WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds):
795         * platform/network/ResourceLoadTiming.cpp:
796         (WebCore::ResourceLoadTiming::convertResourceLoadTimeToMonotonicTime):
797         * platform/network/ResourceLoadTiming.h:
798         (ResourceLoadTiming):
799
800 2012-10-10  Levi Weintraub  <leviw@chromium.org>
801
802         Tests failure on Chromium Mac after r130821
803         https://bugs.webkit.org/show_bug.cgi?id=98865
804
805         Reviewed by Adam Barth.
806
807         Updating the check for USE(HARFBUZZ_NG) to check for Mac Chromium, as the HARFBUZZ_NG flag isn't
808         actually set, despite us using Harfbuzz. This unbreaks Chromium Mac as we diagnose the root
809         cause of this issue.
810
811         * rendering/RenderBlockLineLayout.cpp:
812         (WebCore::setLogicalWidthForTextRun):
813
814 2012-10-10  Stephen Chenney  <schenney@chromium.org>
815
816         SVGTextRunRenderingContext changes font data in the glyph page, but it shouldn't
817         https://bugs.webkit.org/show_bug.cgi?id=98755
818
819         Reviewed by Eric Seidel.
820
821         The code in SVGTextRunRenderingContext::glyphDataForCharacter, when it
822         encounters an <altglyph> tag, immediately replaces the font data for a
823         glyph with font data for the primary font, presumably to meet the SVG
824         spec requirement: "If the references to alternate glyphs do not result
825         in successful identification of alternate glyphs to use, then the
826         character(s) that are inside of the ‘altGlyph’ element are rendered as
827         if the ‘altGlyph’ element were a ‘tspan’ element instead."
828
829         If the alt glyph is not then found we are in the case from the spec
830         and indeed we should use the primary font. However, we end up replacing the GlyphPage
831         entry for the character with primary font data, which we should not do
832         because the glyph page might be used in some place that does not have
833         the alt glyph tag.
834
835         Furthermore, this causes object lifetime problems for font data, because
836         in cases where the font data that is replaced is for the system fallback
837         font the GlyphPage will live forever with no knowldege that it contains
838         font data pointers into font data other that the system fallback. The
839         replaced font data may be deleted while the pointer lives on in the
840         system fallback page.
841
842         The fix is simply not to replace the font data in the page.
843
844         Test: svg/text/alt-glpyh-on-fallback-font-crash.html
845
846         * rendering/svg/SVGTextRunRenderingContext.cpp:
847         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter): Keep track of the original font data and put it back
848         in the glyph page when the method has finished.
849
850 2012-10-10  Tab Atkins  <jackalmage@gmail.com>
851
852         column-count: 0 should not prevent margin-collapse through
853         https://bugs.webkit.org/show_bug.cgi?id=65159
854
855         Reviewed by Tony Chang.
856
857         This patch makes "column-count:0" be properly recognized as invalid syntax,
858         as it violates the property grammar in the spec.
859
860         Tests: fast/multicol/zeroColumnCount.html
861
862         * css/CSSParser.cpp:
863         (WebCore::CSSParser::validUnit):
864         (WebCore::CSSParser::parseValue):
865         * css/CSSParser.h:
866
867 2012-10-10  Benjamin Poulain  <bpoulain@apple.com>
868
869         [WK2] Safari crashes on error when using CFNetwork
870         https://bugs.webkit.org/show_bug.cgi?id=98965
871
872         Reviewed by Sam Weinig.
873
874         The code of ResourceErrorMac when using CFNetwork was assuming
875         there is always either a CFError or an NSError associated with
876         any ResourceError.
877
878         This is not true on WebKit2 where error can be generic errors
879         in the WebProcess (for example a cannotShowURLError).
880         The code was crashing when trying to invoke function on the
881         non-existing CFError.
882
883         This patch fixes the issue by handling that third case separately.
884         If the ResourceError is a generic error, a new NSError is created,
885         similarily to what is done in the non-CFNetwork case.
886
887         * platform/network/mac/ResourceErrorMac.mm:
888         (WebCore::ResourceError::nsError):
889
890 2012-10-10  Alexander Shalamov  <alexander.shalamov@intel.com>
891
892         Invalid values for media query features are not handled
893         https://bugs.webkit.org/show_bug.cgi?id=97006
894
895         Reviewed by Kenneth Rohde Christiansen.
896
897         This patch improves pass rate of CSS3 Media Queries test suite
898         by making media expressions compliant with W3C specification. Few
899         performance issues are fixed by removal of string comparison during
900         media expression evaluation.
901
902         Tests: fast/media/w3c/test_media_queries.html
903
904         * css/CSSGrammar.y: Handle media query expression with specified media restrictor as invalid.
905         * css/MediaQuery.cpp:
906         (WebCore::MediaQuery::serialize): Serialize invalid query according to specification.
907         * css/MediaQueryEvaluator.cpp:
908         (WebCore::orientationMediaFeatureEval): Compare CSSValueID instead of strings.
909         (WebCore::view_modeMediaFeatureEval): Compare CSSValueID instead of strings.
910         (WebCore::pointerMediaFeatureEval): Compare CSSValueID instead of strings.
911         * css/MediaQueryExp.cpp:
912         (WebCore::MediaQueryExp::MediaQueryExp): Check that media features initialized with correct values.
913
914 2012-10-10  Justin Novosad  <junov@chromium.org>
915
916         [Chromium] Smoother animation for non-RAF 2D canvas animations
917         https://bugs.webkit.org/show_bug.cgi?id=97918
918
919         Reviewed by Stephen White.
920
921         Reduces animation jank by preventing the accumulation of multiple
922         frames of backlog in the deferred canvas rendering queue. When the
923         animation is more than one full frame ahead of the compositor, an
924         immediate flush is triggered.  This takes into account overdraw
925         elimination by the skip-on-clear optimization that is built-in to
926         SkDeferredCanvas, to allow non-RAF animations that clear the canvas at
927         each frame to run without any rate limiting. This change also
928         incidentally improves frame rate in many cases by providing more
929         granular batching of GPU API calls, resulting in better pipelining
930         through the command buffer.
931
932         Test: webkit_unit_test Canvas2DLayerManagerTest.testDeferredFrame
933
934         * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
935         (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge):
936         (WebCore::Canvas2DLayerBridge::limitPendingFrames):
937         Called at the end of a task (usually a scheduled script action) that
938         invoked 2d canvas rendering context methods. The end of the task
939         marks the completion of a displayable frame. This method will trigger
940         a flush if it detects that the layer has pending draw commands that
941         are more that one frame old.
942         (WebCore):
943         (WebCore::Canvas2DLayerBridge::flushedDrawCommands):
944         (WebCore::Canvas2DLayerBridge::didFlushPendingCommands):
945         (WebCore::Canvas2DLayerBridge::skippedPendingDrawCommands):
946         (WebCore::Canvas2DLayerBridge::flush):
947         (WebCore::Canvas2DLayerBridge::contextAcquired):
948         * platform/graphics/chromium/Canvas2DLayerBridge.h:
949         (Canvas2DLayerBridge):
950         * platform/graphics/chromium/Canvas2DLayerManager.cpp:
951         (WebCore::Canvas2DLayerManager::~Canvas2DLayerManager):
952         (WebCore::Canvas2DLayerManager::willProcessTask):
953         (WebCore):
954         (WebCore::Canvas2DLayerManager::didProcessTask):
955         (WebCore::Canvas2DLayerManager::layerDidDraw):
956         * platform/graphics/chromium/Canvas2DLayerManager.h:
957         (Canvas2DLayerManager):
958
959 2012-10-10  Beth Dakin  <bdakin@apple.com>
960
961         https://bugs.webkit.org/show_bug.cgi?id=98968
962         REGRESSION: Unable to scroll with trackpad on some websites after 
963         r130783
964
965         Reviewed by Simon Fraser.
966
967         This bug seems to reproduce mostly on web pages that require login. 
968         The re-routing causes extra churn of the RenderLayerBacking, and we 
969         end up destroying and re-creating the backing and therefore the 
970         ScrollingStateNodes, and when the timing is just wrong we get into a 
971         state where the ScrollingTree has a set of incorrect information. 
972         This patch fixes the bug by making sure the ScrollingStateNodes keep 
973         the ScrollingTree in synch with their re-set data.
974
975         Tell the ScrollingStateTree that the root layer has changed.
976         * page/scrolling/ScrollingCoordinator.cpp:
977         (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
978
979         New virtual function will set every property as having changed.
980         * page/scrolling/ScrollingStateNode.h:
981         (WebCore::ScrollingStateNode::setHasChangedProperties):
982         * page/scrolling/ScrollingStateScrollingNode.cpp:
983         (WebCore::ScrollingStateScrollingNode::setHasChangedProperties):
984         (WebCore):
985         * page/scrolling/ScrollingStateScrollingNode.h:
986
987         When the root layer changes, make sure we update the ScrollingTree 
988         appropriately by indicating that every property could have changed.
989         * page/scrolling/ScrollingStateTree.cpp:
990         (WebCore::ScrollingStateTree::rootLayerDidChange):
991         (WebCore):
992         * page/scrolling/ScrollingStateTree.h:
993         (ScrollingStateTree):
994
995 2012-10-10  MORITA Hajime  <morrita@google.com>
996
997         [Chromium] Crash on SpellChecker::didCheck()
998         https://bugs.webkit.org/show_bug.cgi?id=98476
999
1000         Reviewed by Kent Tamura.
1001
1002         SpellChecker::didCheck() assumed m_processingRequest is non-NULL. However, SpellChecker::invokeRequest()
1003         calls SpellCheckRequest::didCancel(), which results didCheck() with NULL m_processingRequest.
1004         This chagne eliminates the problematic didCheck().
1005
1006         No new tests. The case depends on specific timing and is hard to hit by automated testing.
1007
1008         * editing/SpellChecker.cpp:
1009         (WebCore::SpellChecker::didCheck):
1010
1011 2012-10-10  MORITA Hajime  <morrita@google.com>
1012
1013         https://bugs.webkit.org/show_bug.cgi?id=95664
1014         [Shadow DOM] should be able to be available without <style scoped>
1015
1016         Reviewed by Dimitri Glazkov.
1017
1018         This change relaxes ENABLE(STYLE_SCOPED) compilation guard
1019         and styleScopedEnabled() runtime guard. The flags now masks
1020         user visible bits of the code, rather than all of it.
1021         This change also eliminates some redundant guards for simplicity.
1022
1023         Test: fast/dom/shadow/style-scoped-not-enabled.html
1024
1025         * css/StyleResolver.cpp:
1026         (WebCore::StyleResolver::matchScopedAuthorRules):
1027         (WebCore::StyleResolver::locateCousinList):
1028         (WebCore::StyleResolver::canShareStyleWithElement):
1029         (WebCore::StyleResolver::locateSharedStyle):
1030         * css/StyleScopeResolver.cpp:
1031         (WebCore::StyleScopeResolver::scopeFor):
1032         * css/StyleScopeResolver.h:
1033         (WebCore):
1034         * html/HTMLStyleElement.cpp:
1035         (WebCore::HTMLStyleElement::HTMLStyleElement):
1036         (WebCore::HTMLStyleElement::parseAttribute):
1037         (WebCore::HTMLStyleElement::scopedAttributeChanged):
1038         (WebCore::HTMLStyleElement::isRegisteredAsScoped):
1039         (WebCore::HTMLStyleElement::registerWithScopingNode):
1040         (WebCore::HTMLStyleElement::unregisterWithScopingNode):
1041         (WebCore::HTMLStyleElement::insertedInto):
1042         (WebCore::HTMLStyleElement::removedFrom):
1043         (WebCore::HTMLStyleElement::scoped):
1044         (WebCore::HTMLStyleElement::scopingElement):
1045         * html/HTMLStyleElement.h:
1046         (HTMLStyleElement):
1047         * testing/InternalSettings.cpp: Exporsing a flag for testing.
1048         (WebCore::InternalSettings::Backup::Backup):
1049         (WebCore::InternalSettings::Backup::restoreTo):
1050         (WebCore::InternalSettings::setStyleScopedEnabled):
1051         (WebCore):
1052         * testing/InternalSettings.h: Exporsing a flag for testing.
1053         (Backup):
1054         (InternalSettings):
1055         * testing/InternalSettings.idl: Exporsing a flag for testing.
1056
1057 2012-10-10  Roger Fong  <roger_fong@apple.com>
1058
1059         [WebGL] [On Mac] queried attributes and uniforms need to return the original variable name, not the mapped name.
1060         https://bugs.webkit.org/show_bug.cgi?id=98470
1061
1062         Reviewed by Timothy Horton.
1063
1064         When a variable name is too long we translate to a shorter version and keep a mapping between the long and short names.
1065         However, when querying for a variable client side using getActiveAttrib or getActiveUniform, we accidentally return the 
1066         translated names. This fix makes these methods return the original variable names.
1067
1068         Tested using Khronos WebGL conformance suite:
1069         conformance/glsl/misc/glsl-long-variable-names.html
1070
1071         * platform/graphics/GraphicsContext3D.h:
1072         (GraphicsContext3D):
1073         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: getActiveAttrib and getActiveUniform
1074         now use GraphicsContext3D::originalSymbolName to find the original variable name.
1075         (WebCore::GraphicsContext3D::getActiveAttrib):
1076         (WebCore::GraphicsContext3D::getActiveUniform):
1077         (WebCore):
1078         (WebCore::GraphicsContext3D::originalSymbolName): This method returns the original variable name given 
1079         the mapped name.
1080
1081 2012-10-10 Brady Eidson  <beidson@apple.com>
1082
1083         Switch over CachedResource::data() from taking a SharedBuffer to taking a ResourceBuffer.
1084         https://bugs.webkit.org/show_bug.cgi?id=98952
1085
1086         Reviewed by Anders Carlsson.
1087
1088         No new tests (No behavior change).
1089
1090         * html/ImageDocument.cpp:
1091         (WebCore::ImageDocumentParser::appendBytes):
1092         (WebCore::ImageDocumentParser::finish):
1093         * loader/SubresourceLoader.cpp:
1094         (WebCore::SubresourceLoader::sendDataToResource):
1095         (WebCore::SubresourceLoader::didFinishLoading):
1096         * loader/cache/CachedCSSStyleSheet.cpp:
1097         (WebCore::CachedCSSStyleSheet::data):
1098         * loader/cache/CachedCSSStyleSheet.h:
1099         (WebCore):
1100         (CachedCSSStyleSheet):
1101         * loader/cache/CachedFont.cpp:
1102         (WebCore::CachedFont::data):
1103         * loader/cache/CachedFont.h:
1104         (WebCore):
1105         (CachedFont):
1106         * loader/cache/CachedImage.cpp:
1107         (WebCore::CachedImage::data):
1108         * loader/cache/CachedImage.h:
1109         (CachedImage):
1110         * loader/cache/CachedRawResource.cpp:
1111         (WebCore::CachedRawResource::data):
1112         * loader/cache/CachedRawResource.h:
1113         (CachedRawResource):
1114         * loader/cache/CachedResource.cpp:
1115         (WebCore::CachedResource::data):
1116         * loader/cache/CachedResource.h:
1117         (CachedResource):
1118         * loader/cache/CachedSVGDocument.cpp:
1119         (WebCore::CachedSVGDocument::data):
1120         * loader/cache/CachedSVGDocument.h:
1121         (CachedSVGDocument):
1122         * loader/cache/CachedScript.cpp:
1123         (WebCore::CachedScript::data):
1124         * loader/cache/CachedScript.h:
1125         (CachedScript):
1126         * loader/cache/CachedShader.cpp:
1127         (WebCore::CachedShader::data):
1128         * loader/cache/CachedShader.h:
1129         (CachedShader):
1130         * loader/cache/CachedTextTrack.cpp:
1131         (WebCore::CachedTextTrack::data):
1132         * loader/cache/CachedTextTrack.h:
1133         (CachedTextTrack):
1134         * loader/cache/CachedXSLStyleSheet.cpp:
1135         (WebCore::CachedXSLStyleSheet::data):
1136         * loader/cache/CachedXSLStyleSheet.h:
1137         (CachedXSLStyleSheet):
1138
1139 2012-10-10  Jon Lee  <jonlee@apple.com>
1140
1141         [WK2] Activate plugins when user clicks on snapshot
1142         https://bugs.webkit.org/show_bug.cgi?id=98328
1143         <rdar://problem/12426681>
1144
1145         Reviewed by Brady Eidson.
1146
1147         Extend the default event handler to deal with plugins with snapshots.
1148         When the user clicks on the placeholder, the plugin is recreated and displayed.
1149
1150         * loader/FrameLoaderClient.h: Add new client function recreatePlugin(), which is
1151         expected to re-create the plugin with the same parameters as when it was run to
1152         obtain the plugin's snapshot placeholder.
1153
1154         * loader/EmptyClients.cpp: Stub implementation of recreatePlugin().
1155         * loader/EmptyClients.h:
1156         * WebCore.exp.in: Expose HTMLPlugInElement::pluginWidget().
1157
1158         * html/HTMLPlugInElement.cpp:
1159         (WebCore::HTMLPlugInElement::defaultEventHandler): Update to look for
1160         RenderSnapshottedPlugIn. If the plugin is not playing, have the renderer handle the
1161         event.
1162
1163         * rendering/RenderSnapshottedPlugIn.cpp:
1164         (WebCore::RenderSnapshottedPlugin::getCursor): Set to hand cursor when the plugin is not
1165         playing.
1166         (WebCore::RenderSnapshottedPlugIn::handleEvent): If the user clicked on the plugin using the
1167         left button, update the state of the element to playing. Recreate the plugin if the widget exists
1168         to begin with. The cached snapshot image will be saved for possible reuse on back/forward navigation.
1169         * rendering/RenderSnapshottedPlugIn.h:
1170         (RenderSnapshottedPlugIn):
1171
1172 2012-10-10  Kenichi Ishibashi  <bashi@chromium.org>
1173
1174         FontVerticalDataCache should allow zero as a key value
1175         https://bugs.webkit.org/show_bug.cgi?id=98877
1176
1177         Reviewed by Tony Chang.
1178
1179         Use WTF::UnsignedWithZeroKeyHashTraits for type definition of
1180         FontVerticalDataCache.
1181
1182         No new tests because there is no certain way to make
1183         FontPlatformDataHarfBuzz::uniqueID() be zero.
1184
1185         * platform/graphics/FontCache.cpp:
1186         (WebCore):
1187         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
1188         (WebCore::FontPlatformData::verticalData): Removed zero check of uniqueID().
1189         (WebCore::FontPlatformData::openTypeTable): Ditto.
1190
1191 2012-10-10  Regina Chung  <heejin.r.chung@samsung.com>
1192
1193         [EFL] Use the shareable GraphicsContext3DOpenGL* implementation.
1194         https://bugs.webkit.org/show_bug.cgi?id=96627
1195
1196         Reviewed by Kenneth Rohde Christiansen.
1197
1198         Changed EFL implementation of GraphicsContext3D(GC3D) to use GraphicsContext3DOpenGL*.
1199         It was initially implemented in a different way, due to characteristics of Evas,
1200         but it would be better to use the common implementation and find another way
1201         to deal with Evas, especially because all the duplicated code.
1202
1203         No new tests. No functional changes.
1204
1205         * PlatformEfl.cmake: Removed cairo implementation of GC3D and added efl files to WebCore_SOURCES.
1206         * platform/graphics/efl/GraphicsContext3DEfl.cpp: Modified code so GC3DOpenGL* can be used.
1207         (WebCore::GraphicsContext3D::create):
1208         (WebCore::GraphicsContext3D::GraphicsContext3D):
1209         (WebCore::GraphicsContext3D::platformLayer):
1210         (WebCore::GraphicsContext3D::makeContextCurrent):
1211         (WebCore::GraphicsContext3D::setContextLostCallback):
1212         (WebCore::GraphicsContext3D::setErrorMessageCallback):
1213         (WebCore::GraphicsContext3D::paintToCanvas):
1214         (WebCore):
1215         (WebCore::GraphicsContext3D::createGraphicsSurfaces):
1216         (WebCore::GraphicsContext3D::releaseShaderCompiler):
1217         (WebCore::GraphicsContext3D::getImageData):
1218         * platform/graphics/efl/GraphicsContext3DPrivate.cpp: Removed functions implemented in GC3DOpenGL*
1219         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
1220         (WebCore):
1221         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
1222         (WebCore::GraphicsContext3DPrivate::createSurface):
1223         (WebCore::GraphicsContext3DPrivate::platformGraphicsContext3D):
1224         (WebCore::GraphicsContext3DPrivate::makeContextCurrent):
1225         (WebCore::GraphicsContext3DPrivate::isGLES2Compliant):
1226         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
1227         * platform/graphics/efl/GraphicsContext3DPrivate.h: Removed functions implemented in GC3DOpenGL*
1228         (GraphicsContext3DPrivate):
1229
1230 2012-10-10  Tony Chang  <tony@chromium.org>
1231
1232         Unreviewed, rolling out r130937, r130949, r130955, and
1233         r130957.
1234         http://trac.webkit.org/changeset/130937
1235         http://trac.webkit.org/changeset/130949
1236         http://trac.webkit.org/changeset/130955
1237         http://trac.webkit.org/changeset/130957
1238         https://bugs.webkit.org/show_bug.cgi?id=94290
1239
1240         Breaks Qt build
1241
1242         * CMakeLists.txt:
1243         * DerivedSources.make:
1244         * DerivedSources.pri:
1245         * GNUmakefile.am:
1246         * WebCore.gyp/WebCore.gyp:
1247         * WebCore.gyp/scripts/action_preprocessgrammar.py: Removed.
1248         * WebCore.vcproj/WebCore.vcproj:
1249         * WebCore.xcodeproj/project.pbxproj:
1250         * css/CSSGrammar.y: Renamed from Source/WebCore/css/CSSGrammar.y.in.
1251         * css/CSSGrammar.y.includes: Removed.
1252         * css/makegrammar.pl:
1253
1254 2012-10-10  Rob Buis  <rbuis@rim.com>
1255
1256         [BlackBerry] Adapt to new image for search-cancel
1257         https://bugs.webkit.org/show_bug.cgi?id=98954
1258
1259         Reviewed by Antonio Gomes.
1260
1261         The new image for search-cancel is bigger than the old one, so invert the scaling.
1262
1263         * platform/blackberry/RenderThemeBlackBerry.cpp:
1264         (WebCore::RenderThemeBlackBerry::adjustSearchFieldCancelButtonStyle):
1265
1266 2012-10-10  Tony Chang  <tony@chromium.org>
1267
1268         Unreviewed, another speculative fix for Qt Win.
1269
1270         * DerivedSources.pri: Pass --preprocessor to the perl script.
1271         * css/makegrammar.pl: Use --preprocessor instead of /usr/bin/gcc.
1272
1273 2012-10-10  Tony Chang  <tony@chromium.org>
1274
1275         Unreviewed, another speculative fix for Qt Win.
1276
1277         * DerivedSources.pri: Make the path slash marks be forward slashes to the .in file.
1278
1279 2012-10-10  David Barton  <dbarton@mathscribe.com>
1280
1281         Turn on ENABLE_MATHML for Chromium
1282         https://bugs.webkit.org/show_bug.cgi?id=96960
1283
1284         Reviewed by Adam Barth.
1285
1286         Add the rendering/mathml directory to search.
1287
1288         * WebCore.gyp/WebCore.gyp:
1289
1290 2012-10-10  Tony Chang  <tony@chromium.org>
1291
1292         Unreviewed, speculative build fix for Qt Win.
1293
1294         * css/makegrammar.pl: Rather than making a temp file, use a pipe to
1295         pass data from gcc to the final output file.
1296
1297 2012-10-10  Brady Eidson  <beidson@apple.com>
1298
1299         Switch CachedResource over from SharedBuffer to a new ResourceBuffer
1300         https://bugs.webkit.org/show_bug.cgi?id=98541
1301
1302         Reviewed by Anders Carlsson.
1303
1304         As part of preparation for a WebKit2 NetworkProcess, we need to change the data handle shared
1305         between CachedResources and ResourceLoaders to be one that can be backed by something other
1306         than a SharedBuffer.
1307
1308         ResourceBuffer is this new object. Right now it is directly backed by a SharedBuffer and there
1309         should be no change in behavior.
1310
1311         No new tests (No behavior change).
1312
1313         * WebCore.exp.in:
1314         * WebCore.xcodeproj/project.pbxproj:
1315         * WebCore.vcproj/WebCore.vcproj:
1316         * CMakeLists.txt:
1317         * GNUmakefile.list.am:
1318         * Target.pri:
1319         * WebCore.gypi:
1320
1321         Implementation of the new ResourceBuffer, backed directly by a SharedBuffer:
1322         * loader/ResourceBuffer.cpp: Added.
1323         (WebCore):
1324         (WebCore::ResourceBuffer::ResourceBuffer):
1325         (WebCore::ResourceBuffer::~ResourceBuffer):
1326         (WebCore::ResourceBuffer::data):
1327         (WebCore::ResourceBuffer::size):
1328         (WebCore::ResourceBuffer::isEmpty):
1329         (WebCore::ResourceBuffer::getSomeData):
1330         (WebCore::ResourceBuffer::sharedBuffer):
1331         (WebCore::ResourceBuffer::copy):
1332         (WebCore::ResourceBuffer::hasPurgeableBuffer):
1333         (WebCore::ResourceBuffer::releasePurgeableBuffer):
1334         (WebCore::ResourceBuffer::createCFData):
1335
1336         * loader/ResourceBuffer.h: Added.
1337         (WebCore):
1338         (ResourceBuffer):
1339         (WebCore::ResourceBuffer::create):
1340         (WebCore::ResourceBuffer::adoptSharedBuffer):
1341         * loader/mac/ResourceBuffer.mm: Added.
1342
1343         (WebCore):
1344         (WebCore::ResourceBuffer::createNSData):
1345
1346         Switch CachedResource over to using it:
1347         * loader/cache/CachedResource.cpp:
1348         (WebCore::CachedResource::makePurgeable):
1349
1350         * loader/cache/CachedResource.h:
1351         (WebCore):
1352         (WebCore::CachedResource::resourceBuffer):
1353         (CachedResource):
1354
1355         Switch all the other CachedResource subclasses over to using it:
1356         * loader/cache/CachedCSSStyleSheet.cpp:
1357         (WebCore::CachedCSSStyleSheet::data):
1358
1359         * loader/cache/CachedFont.cpp:
1360         (WebCore::CachedFont::data):
1361         (WebCore::CachedFont::ensureCustomFontData):
1362
1363         * loader/cache/CachedImage.cpp:
1364         (WebCore::CachedImage::didAddClient):
1365         (WebCore::CachedImage::data):
1366
1367         * loader/cache/CachedRawResource.cpp:
1368         (WebCore::CachedRawResource::data):
1369
1370         * loader/cache/CachedScript.cpp:
1371         (WebCore::CachedScript::data):
1372
1373         * loader/cache/CachedShader.cpp:
1374         (WebCore::CachedShader::data):
1375
1376         * loader/cache/CachedTextTrack.cpp:
1377         (WebCore::CachedTextTrack::data):
1378         
1379         * loader/cache/CachedXSLStyleSheet.cpp:
1380         (WebCore::CachedXSLStyleSheet::data):
1381
1382         Switch other affect parties over to using it:
1383         * inspector/InspectorPageAgent.cpp:
1384         (WebCore::decodeBuffer):
1385         (WebCore::InspectorPageAgent::cachedResourceContent):
1386         (WebCore::InspectorPageAgent::sharedBufferContent):
1387
1388         * loader/DocumentLoader.cpp:
1389         (WebCore::DocumentLoader::subresource):
1390
1391         * loader/TextTrackLoader.cpp:
1392         (WebCore::TextTrackLoader::processNewCueData):
1393         (WebCore::TextTrackLoader::didReceiveData):
1394
1395         * loader/archive/cf/LegacyWebArchive.cpp:
1396         (WebCore::LegacyWebArchive::create):
1397
1398         * loader/icon/IconLoader.cpp:
1399         (WebCore::IconLoader::notifyFinished):
1400
1401         * platform/mac/PasteboardMac.mm:
1402         (WebCore::fileWrapperForImage):
1403
1404 2012-10-10  Julien Chaffraix  <jchaffraix@webkit.org>
1405
1406         Unreviewed build fix after r130940.
1407
1408         * platform/graphics/skia/GraphicsContextSkia.cpp:
1409         (WebCore::GraphicsContext::drawLineForDocumentMarker):
1410         Avoid redefining the same variable twice.
1411
1412 2012-10-10  Alexis Menard  <alexis@webkit.org>
1413
1414         [Mac] Deprecate getPropertyShorthand from objective c bindings for future removal
1415         https://bugs.webkit.org/show_bug.cgi?id=98916
1416
1417         Reviewed by Timothy Hatcher.
1418
1419         Mark getPropertyShorthand as deprecated so we can remove it later. It will allow us
1420         to remove getPropertyShorthand from the web exposed API (this function is not part of
1421         any specification, it was there for historical reason).
1422
1423         No new tests : just mark a function as deprecated.
1424
1425         * bindings/objc/PublicDOMInterfaces.h:
1426
1427 2012-10-10  Mike West  <mkwst@chromium.org>
1428
1429         Web Inspector: add support for %c (style) in console API
1430         https://bugs.webkit.org/show_bug.cgi?id=69401
1431
1432         Reviewed by Pavel Feldman.
1433
1434         This patch mimics Firebug's '%c' option when calling 'console.log'
1435         messages. 'console.log("%cBlue!", "color: blue;");' will write blue
1436         text to the console, and so on.
1437
1438         To match Firebug's behavior, multiple '%c' entries will overwrite each
1439         other: only one style will be applied. Sorry, folks.
1440
1441         Test: inspector/console/console-format-style.html
1442
1443         * inspector/front-end/ConsoleMessage.js:
1444         (WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString.styleFormatter):
1445         (WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString.append):
1446         (WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString):
1447
1448 2012-10-10  Varun Jain  <varunjain@chromium.org>
1449
1450         [chromium] Spelling and grammar markers are pixelated in hidpi.
1451         https://bugs.webkit.org/show_bug.cgi?id=98339
1452
1453         Reviewed by Stephen White.
1454
1455         We create separate bitmaps for markers in normal and hidpi mode as per
1456         specification from UX and choose the right bitmap based on the current
1457         device scale factor.
1458
1459         Tests: editing/spelling/grammar-markers-hidpi.html
1460                editing/spelling/inline-spelling-markers-hidpi.html
1461
1462         * platform/graphics/skia/GraphicsContextSkia.cpp:
1463         (WebCore::draw2xMarker):
1464         (WebCore):
1465         (WebCore::draw1xMarker):
1466         (WebCore::GraphicsContext::drawLineForDocumentMarker):
1467         * platform/graphics/skia/PlatformContextSkia.cpp:
1468         (WebCore::PlatformContextSkia::PlatformContextSkia):
1469         * platform/graphics/skia/PlatformContextSkia.h:
1470         (WebCore::PlatformContextSkia::deviceScaleFactor):
1471         (WebCore::PlatformContextSkia::setDeviceScaleFactor):
1472         (PlatformContextSkia):
1473
1474 2012-10-10  Pablo Flouret  <pablof@motorola.com>
1475
1476         Pre-process CSSGrammar.y before running through bison.
1477         https://bugs.webkit.org/show_bug.cgi?id=94290
1478
1479         Reviewed by Tony Chang.
1480
1481         Running CSSGrammar.y through a preprocessor allows the use of feature
1482         defines in all places of the yacc file (i.e. not just in C blocks).
1483         Mostly useful to be able to keep every part of a feature under feature
1484         flags for self-documenting purposes.
1485
1486         No new tests, CSSGrammar.y should be generated correctly and everything
1487         should keep working as before.
1488
1489         * CMakeLists.txt:
1490         * DerivedSources.make:
1491         * DerivedSources.pri:
1492         * GNUmakefile.am:
1493             Modify build systems to use makegrammar.pl to generate the .y files
1494             and run those through bison.
1495
1496         * WebCore.gyp/WebCore.gyp:
1497         * WebCore.gyp/scripts/action_preprocessgrammar.py: Added.
1498             Add a new action to preprocess the CSSGrammar.y.in file before the
1499             bison rule is run.
1500
1501         * WebCore.vcproj/WebCore.vcproj:
1502         * WebCore.xcodeproj/project.pbxproj:
1503             Add the new .y.in / .y.includes files.
1504
1505         * css/CSSGrammar.y.in: Renamed from Source/WebCore/css/CSSGrammar.y.
1506             Also moved the top declarations section that has includes, defines,
1507             etc. to its own file. These shouldn't be touched by the first
1508             pass of the preprocessor. And changed the existing ENABLE(FEATURE)
1509             ifdefs to ENABLE_FEATURE since the ENABLE() macro is not available
1510             yet.
1511         * css/CSSGrammar.y.includes: Added.
1512             The aforementioned declarations header section. After the .y.in file
1513             is processed it will be concatenated with this one to make the
1514             CSSGrammar.y file.
1515
1516         * css/makegrammar.pl:
1517             Modify the script to handle .y.in files.
1518
1519 2012-10-10  Luciano Wolf  <luciano.wolf@openbossa.org>
1520
1521         EventHandler::handleGestureLongPress breaks compilation if CONTEXT_MENUS isn't set
1522         https://bugs.webkit.org/show_bug.cgi?id=98890
1523
1524         Reviewed by Caio Marcelo de Oliveira Filho.
1525
1526         * page/EventHandler.cpp:
1527         (WebCore::EventHandler::handleGestureLongPress):
1528
1529 2012-10-10  David Grogan  <dgrogan@chromium.org>
1530
1531         Inspector: display IndexedDB integer versions
1532         https://bugs.webkit.org/show_bug.cgi?id=95816
1533
1534         Reviewed by Vsevolod Vlasov.
1535
1536         Added basic test to database-structure.html
1537
1538         * inspector/Inspector.json:
1539         * inspector/InspectorIndexedDBAgent.cpp:
1540         (WebCore):
1541         * inspector/front-end/IndexedDBModel.js:
1542         (WebInspector.IndexedDBModel.prototype._loadDatabase.callback):
1543         (WebInspector.IndexedDBModel.prototype._loadDatabase):
1544         (WebInspector.IndexedDBModel.Database):
1545         * inspector/front-end/IndexedDBViews.js:
1546         (WebInspector.IDBDatabaseView):
1547         (WebInspector.IDBDatabaseView.prototype._refreshDatabase):
1548
1549 2012-10-10  Simon Fraser  <simon.fraser@apple.com>
1550
1551         Store a visible rect in GraphicsLayers, and optionally dump it in layerTreeAsText
1552         https://bugs.webkit.org/show_bug.cgi?id=98839
1553
1554         Reviewed by Sam Weinig.
1555
1556         To replace CATiledLayer with TileCaches, we need to be able to compute the visible part of a GraphicsLayer,
1557         in order to limit the extent of TileCache tiles. Reuse the existing code in GraphicsLayerCA for this,
1558         but store the computed rect in m_visibleRect.
1559         
1560         Add a flag to layerTreeAsText() so that tests can optionally include this visible rect in
1561         layer tree dumps. This output will be platform-specific, so we don't want to do it unconditionally.
1562
1563         * WebCore.exp.in: Signature of Frame::layerTreeAsText() changed.
1564         * page/Frame.cpp:
1565         (WebCore::Frame::layerTreeAsText): Change to take some enum flags rather than just a bool.
1566         * page/Frame.h:
1567         * platform/graphics/GraphicsLayer.cpp:
1568         (WebCore::GraphicsLayer::writeIndent): Make into a static class method so subclasses can use it.
1569         (WebCore::GraphicsLayer::dumpProperties): Call a virtual dumpAdditionalProperties() for subclasses.
1570         (showGraphicsLayerTree):
1571         * platform/graphics/GraphicsLayer.h:
1572         (GraphicsLayer): New LayerTreeAsTextIncludeVisibleRects flag.
1573         (WebCore::GraphicsLayer::dumpAdditionalProperties): New virtual method.
1574         * platform/graphics/ca/GraphicsLayerCA.cpp:
1575         (WebCore::GraphicsLayerCA::recursiveCommitChanges): clipRectForChildren and clipRectForSelf
1576         were previously unused and buggy. Fix to correctly compute clipRectForSelf, to assign
1577         to m_visibleRect.
1578         (WebCore::GraphicsLayerCA::dumpAdditionalProperties): Dump m_visibleRect.
1579         * platform/graphics/ca/GraphicsLayerCA.h:
1580         (GraphicsLayerCA):
1581         * rendering/RenderLayerCompositor.cpp:
1582         (WebCore::RenderLayerCompositor::layerTreeAsText): Convert the flags from Frame flags
1583         to GraphicsLayerFlags and pass them along.
1584         * rendering/RenderLayerCompositor.h:
1585         (RenderLayerCompositor):
1586         * testing/Internals.cpp:
1587         (WebCore::Internals::layerTreeAsText): Overloaded method to handle the optional IDL arguments.
1588         * testing/Internals.h: Add enum.
1589         * testing/Internals.idl: Add optional flags, and a const short to describe the flags.
1590
1591 2012-10-10  Shinya Kawanaka  <shinyak@chromium.org>
1592
1593         Needs internal API to return distributed nodes for InsertionPoint
1594         https://bugs.webkit.org/show_bug.cgi?id=98868
1595
1596         Reviewed by Hajime Morita.
1597
1598         When testing insertion points, we would like to have an internal API which returns a node list
1599         distributed to an insertion point.
1600
1601         We've added the API in Internals.
1602
1603         Test: fast/dom/shadow/distributed-nodes.html
1604
1605         * WebCore.exp.in:
1606         * html/shadow/InsertionPoint.cpp:
1607         (WebCore::InsertionPoint::distributedNodes): Returns the distributed nodes. When InsertionPoint is not
1608         attached, the result will be null, since the distribution is not calculated correctly.
1609         (WebCore):
1610         * html/shadow/InsertionPoint.h:
1611         (InsertionPoint):
1612         * testing/Internals.cpp:
1613         (WebCore::Internals::distributedNodes):
1614         (WebCore):
1615         * testing/Internals.h:
1616         (Internals):
1617         * testing/Internals.idl:
1618
1619 2012-10-10  Wei James  <james.wei@intel.com>
1620
1621         [Chromium]Android x86 content shell debug build warning for uninitialized value used as error with gcc 4.6
1622         https://bugs.webkit.org/show_bug.cgi?id=98629
1623
1624         Reviewed by Adam Barth.
1625
1626         Warning was taken as error for uninitialized value being used when
1627         building content shell for Android x86 with gcc 4.6.
1628
1629         * WebCore.gyp/WebCore.gyp:
1630
1631 2012-10-10  Andrei Bucur  <abucur@adobe.com>
1632
1633         [CSS Regions] Create a separate list for the invalid regions
1634         https://bugs.webkit.org/show_bug.cgi?id=98752
1635
1636         Reviewed by Andreas Kling.
1637
1638         This patch moves the invalid regions in a low traffic data structure, outside the main region list. This should add a small performance boost (there's no test for it) and simplifies the code in the following ways:
1639         - iterations through the region list don't need to worry about invalid regions
1640         - accessing the first/last region is straightforward
1641         - list manipulations are easier to implement (e.g. binary search for a region)
1642
1643         Tests: Adapted fast/regions/flows-dependency-same-flow.html to use the new dump format for the region chain.
1644
1645         * dom/WebKitNamedFlow.cpp:
1646         (WebCore::WebKitNamedFlow::getRegionsByContent): Now returns only the valid regions.
1647         (WebCore::WebKitNamedFlow::getRegions): Now returns only the valid regions.
1648         * rendering/RenderFlowThread.cpp:
1649         (WebCore::RenderFlowThread::RenderFlowThread):
1650         (WebCore::RenderFlowThread::layout):
1651         (WebCore::RenderFlowThread::updateLogicalWidth):
1652         (WebCore::RenderFlowThread::computeLogicalHeight):
1653         (WebCore::RenderFlowThread::repaintRectangleInRegions):
1654         (WebCore::RenderFlowThread::regionAtBlockOffset):
1655         (WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
1656         (WebCore::RenderFlowThread::logicalWidthChangedInRegions):
1657         (WebCore::RenderFlowThread::firstRegion):
1658         (WebCore::RenderFlowThread::lastRegion):
1659         (WebCore::RenderFlowThread::computeOverflowStateForRegions):
1660         (WebCore::RenderFlowThread::regionInRange):
1661         (WebCore::RenderFlowThread::checkRegionsWithStyling):
1662         (WebCore::RenderFlowThread::objectInFlowRegion):
1663         (WebCore::RenderFlowThread::autoLogicalHeightRegionsCount):
1664         * rendering/RenderFlowThread.h:
1665         * rendering/RenderNamedFlowThread.cpp:
1666         (WebCore):
1667         (WebCore::addRegionToList):
1668         (WebCore::RenderNamedFlowThread::addRegionToThread):
1669         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
1670         (WebCore::RenderNamedFlowThread::checkInvalidRegions):
1671         * rendering/RenderNamedFlowThread.h:
1672         (WebCore::RenderNamedFlowThread::invalidRenderRegionList):
1673         (RenderNamedFlowThread):
1674         (WebCore::RenderNamedFlowThread::canBeDestroyed):
1675         * rendering/RenderTreeAsText.cpp:
1676         (WebCore::writeRenderRegionList):
1677         (WebCore):
1678         (WebCore::writeRenderNamedFlowThreads): The valid regions are listed first followed by the invalid regions.
1679
1680 2012-10-10  Vsevolod Vlasov  <vsevik@chromium.org>
1681
1682         Web Inspector: [Regression] Stale revisions are not cleared when inspector is opened for the already loaded page.
1683         https://bugs.webkit.org/show_bug.cgi?id=98915
1684
1685         Reviewed by Alexander Pavlov.
1686
1687         WorkspaceController now clears stale revisions on navigation as well.
1688
1689         * inspector/front-end/Workspace.js:
1690         (WebInspector.WorkspaceController):
1691         (WebInspector.WorkspaceController.prototype._mainFrameNavigated):
1692
1693 2012-10-10  Vsevolod Vlasov  <vsevik@chromium.org>
1694
1695         Web Inspector: Exception when committing java script editing with revision history view open.
1696         https://bugs.webkit.org/show_bug.cgi?id=98908
1697
1698         Reviewed by Alexander Pavlov.
1699
1700         Added null check.
1701
1702         * inspector/front-end/RevisionHistoryView.js:
1703
1704 2012-10-10  Pavel Feldman  <pfeldman@chromium.org>
1705
1706         Web Inspector: protect node in the InspectorDOMNode::inspect
1707         https://bugs.webkit.org/show_bug.cgi?id=98914
1708
1709         Reviewed by Yury Semikhatsky.
1710
1711         * inspector/InspectorDOMAgent.cpp:
1712         (WebCore::InspectorDOMAgent::inspect):
1713
1714 2012-10-10  Mike West  <mkwst@google.com>
1715
1716         EditorCommand calls setProperty with the wrong parameters.
1717         https://bugs.webkit.org/show_bug.cgi?id=98896
1718
1719         Reviewed by Jochen Eisinger.
1720
1721         EditorCommand::executeToggleStyleInList calls
1722         StylePropertySet::setProperty with an ExceptionCode as the final
1723         argument. This only succeeds because it's automagically cast to a bool,
1724         which is what the method actually expects.
1725
1726         Implicitly passing in 'false' by dropping the parameter shouldn't change
1727         any visible functionality; no new tests are required.
1728
1729         * editing/EditorCommand.cpp:
1730         (WebCore::executeToggleStyleInList):
1731
1732 2012-10-10  Mike West  <mkwst@google.com>
1733
1734         HTMLTextFormControlElement calls setInlineStyleProperty with the wrong parameters.
1735         https://bugs.webkit.org/show_bug.cgi?id=98892
1736
1737         Reviewed by Jochen Eisinger.
1738
1739         HTMLTextFormControlElement::updatePlaceholderVisibility calls
1740         HTMLElement::setInlineStyleProperty with an ExceptionCode as the last
1741         parameter. This only succeeds because it's automagically cast to a bool,
1742         which is what the method actually expects.
1743
1744         Implicitly passing in 'false' by dropping the parameter shouldn't change
1745         any functionality; so no new tests are required.
1746
1747         * html/HTMLTextFormControlElement.cpp:
1748         (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
1749
1750 2012-10-10  Christophe Dumez  <christophe.dumez@intel.com>
1751
1752         SQLResultSet.rowsAffected not cleared
1753         https://bugs.webkit.org/show_bug.cgi?id=46070
1754
1755         Reviewed by Kenneth Rohde Christiansen.
1756
1757         SQLResultSet.rowsAffected is supposed to return the number
1758         of rows that were changed by the statement. For "SELECT"
1759         statements, it should return 0.
1760
1761         However, our implementation currently relies on sqlite3_changes()
1762         to compute this value. sqlite3_changes() returns the number of
1763         direct row changes in the most recent INSERT, UPDATE, or DELETE
1764         statement within the same trigger context. Unfortunately, the
1765         most recent INSERT, UPDATE, or DELETE statement may not be the
1766         last statement. As a consequence, if you INSERT 1 row, then
1767         do a SELECT, SQLResultSet.rowsAffected will be 1 for both the
1768         INSERT and the SELECT statements.
1769
1770         The proposed solution is to use sqlite3_total_changes() instead
1771         of sqlite3_changes(). sqlite3_total_changes() returns the number
1772         of row changes caused by INSERT, UPDATE or DELETE statements since
1773         the database connection was opened. We now store the value
1774         returned by sqlite3_total_changes() before each statement in
1775         order to return the count difference in
1776         SQLiteDatabase::lastChanges().
1777
1778         Test: storage/websql/execute-sql-rowsAffected.html
1779
1780         * platform/sql/SQLiteDatabase.cpp:
1781         (WebCore::SQLiteDatabase::SQLiteDatabase):
1782         (WebCore::SQLiteDatabase::updateLastChangesCount):
1783         (WebCore):
1784         (WebCore::SQLiteDatabase::lastChanges):
1785         * platform/sql/SQLiteDatabase.h:
1786         (SQLiteDatabase):
1787         * platform/sql/SQLiteStatement.cpp:
1788         (WebCore::SQLiteStatement::step):
1789
1790 2012-10-10  Keishi Hattori  <keishi@webkit.org>
1791
1792         REGRESSION (r129738): Calendar picker is too wide when the input is rtl
1793         https://bugs.webkit.org/show_bug.cgi?id=98881
1794
1795         Reviewed by Kent Tamura.
1796
1797         Calendar picker should use param.isCalendarRTL instead of param.isRTL but some were left.
1798
1799         No new tests. Covered by ManualTests/forms/calendar-picker.html.
1800
1801         * Resources/pagepopups/calendarPicker.js:
1802         (CalendarPicker.prototype.fixWindowSize): Calendar picker should use param.isCalendarRTL instead of param.isRTL.
1803         (DaysTable.prototype._handleKey): Ditto.
1804
1805 2012-10-10  Alexander Pavlov  <apavlov@chromium.org>
1806
1807         Web Inspector: Semantically incorrect CSS rules result in broken source code data
1808         https://bugs.webkit.org/show_bug.cgi?id=98520
1809
1810         Reviewed by Vsevolod Vlasov.
1811
1812         Pop and throw away rule data from the stack when data have been collected for a semantically invalid CSS rule
1813         (which is not going to be created).
1814
1815         * css/CSSParser.cpp:
1816         (WebCore::CSSParser::createImportRule):
1817         (WebCore::CSSParser::createFontFaceRule):
1818         (WebCore::CSSParser::createPageRule):
1819         (WebCore::CSSParser::createRegionRule):
1820
1821 2012-10-10  Zeno Albisser  <zeno@webkit.org>
1822
1823         [Qt][Mac] GL_ARB_texture_rectangle must be activated when using ANGLE.
1824         https://bugs.webkit.org/show_bug.cgi?id=98387
1825
1826         Check for the availability of GL_ARB_texture_rectangle extension.
1827         In case it is available, we activate the extension for ANGLE.
1828         This is necessary for WebGL on mac, because the GraphicsSurface
1829         on this platform is based on an IOSurface, which requires this extension.
1830
1831         Reviewed by Noam Rosenthal.
1832
1833         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1834         (WebCore::GraphicsContext3DPrivate::initializeANGLE):
1835
1836 2012-10-10  Andreas Kling  <kling@webkit.org>
1837
1838         ElementAttributeData: tighten member packing on 64-bit.
1839         <http://webkit.org/b/98861>
1840
1841         Reviewed by Anders Carlsson.
1842
1843         Pack m_isMutable and m_arraySize into the slack from the RefCounted base on 64-bit.
1844         218kB progression on Membuster3.
1845
1846         * dom/ElementAttributeData.h:
1847         (ElementAttributeData):
1848
1849 2012-10-10  Alexandre Elias  <aelias@chromium.org>
1850
1851         Text Autosizing: Counteract funky window sizing on Android.
1852         https://bugs.webkit.org/show_bug.cgi?id=98809
1853
1854         Reviewed by Adam Barth.
1855
1856         In Chrome for Android, the window sizes provided to WebCore are
1857         currently in physical screen pixels instead of
1858         device-scale-adjusted units. For example window width on a
1859         Galaxy Nexus is 720 instead of 360.  Text autosizing expects
1860         device-independent pixels.  When Chrome for Android cuts over to
1861         the new coordinate space, it will be tied to the setting
1862         applyPageScaleFactorInCompositor.
1863
1864         No new tests.
1865
1866         * rendering/TextAutosizer.cpp:
1867         (WebCore::TextAutosizer::processSubtree):
1868
1869 2012-10-09  Philip Rogers  <pdr@google.com>
1870
1871         Recursively detach SVGElementInstances
1872         https://bugs.webkit.org/show_bug.cgi?id=98851
1873
1874         Reviewed by Ryosuke Niwa and Abhishek Arya
1875
1876         Before this patch, SVGElementInstance child nodes were not being detached. This
1877         patch makes detach() recursively detach SVGElementInstances.
1878
1879         * svg/SVGElementInstance.cpp:
1880         (WebCore::SVGElementInstance::detach):
1881
1882 2012-10-09  Kenichi Ishibashi  <bashi@chromium.org>
1883
1884         [Chromium] Fix harfbuzz-ng related code after r130231
1885         https://bugs.webkit.org/show_bug.cgi?id=98858
1886
1887         Reviewed by Kent Tamura.
1888
1889         Replace first/second with key/value.
1890
1891         No new tests. No changes in behavior.
1892
1893         * platform/graphics/harfbuzz/ng/HarfBuzzNGFaceSkia.cpp:
1894         (WebCore::harfbuzzGetGlyph):
1895         * platform/graphics/skia/SimpleFontDataSkia.cpp:
1896         (WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
1897
1898 2012-10-09  Enrica Casucci  <enrica@apple.com>
1899
1900         Only measure text once instead of twice when performing line layout.
1901         https://bugs.webkit.org/show_bug.cgi?id=98317
1902         <rdar://problem/12080821>
1903
1904         Reviewed by Dan Bernstein.
1905
1906         Since we are measuring each word to find out where the line break should occur,
1907         we should cache that information to avoid measuring the run again when
1908         creating the line box. The bulk of the change is in nextLineBreak, where
1909         the measurements are collected and placed in a vector so that they can
1910         be consumed in setLogicalWidthForTextRun where we used to measure the
1911         text one more time.
1912         Each entry in the vector is a WordMeasurement object that contains information
1913         about the start and end offset in the run, the renderer, the measured width
1914         and, possibly, a list of fallback fonts.
1915         When we need to compute the width of the run to create the line box, we add
1916         all the measurements for the given renderer in the run to get the total width.
1917         This optiomization is currently disabled for platforms using HarfBuzz.
1918
1919         * platform/graphics/Font.cpp:
1920         (WebCore::Font::width): Added fallback fonts parameter.
1921         * platform/graphics/Font.h:
1922         (Font): Added fallback fonts parameter to the width static member function.
1923         This method is called when we compute the width using TextLayout.
1924         * platform/graphics/mac/ComplexTextController.cpp:
1925         (WebCore::TextLayout::width): Added fallback fonts parameter.
1926         (WebCore::Font::width):
1927         (WebCore::ComplexTextController::advance):
1928         * platform/graphics/mac/ComplexTextController.h:
1929         (ComplexTextController): Added fallback fonts parameter to advance method.
1930         * rendering/RenderBlock.h: Added WordMeasures parameter to few methods.
1931         * rendering/RenderBlockLineLayout.cpp:
1932         (WordMeasurement): Added new class to hold measurement information.
1933         (WebCore::setLogicalWidthForTextRun): This is where we compute the run width using the
1934         cached information.
1935         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Added wordMeasures parameter.
1936         (WebCore::RenderBlock::createLineBoxesFromBidiRuns): Added wordMeasures parameter.
1937         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Added declaration of the WordMeasures
1938         vector and its use.
1939         (WebCore::textWidth): Added fallbackFonts parameter, since now we only measure once.
1940         (WebCore::RenderBlock::LineBreaker::nextLineBreak): This method has been modified to collect
1941         the measurements of the individual words and add them to the vector.
1942
1943 2012-10-09  Andreas Kling  <kling@webkit.org>
1944
1945         GlyphPageTreeNode should use HashMap<OwnPtr>.
1946         <http://webkit.org/b/98845>
1947
1948         Reviewed by Dan Bernstein.
1949
1950         - Replace manual memory management by OwnPtrs.
1951         - Added a GlyphPageTreeNodeMap typedef to make call sites look a bit nicer.
1952         = Changed some hashmap get()/remove() pairs to use the more efficient take() instead.
1953         - Made the constructor private, it has no external clients.
1954
1955         * platform/graphics/GlyphPageTreeNode.cpp:
1956         (WebCore::GlyphPageTreeNode::getRoot):
1957         (WebCore::GlyphPageTreeNode::pageCount):
1958         (WebCore::GlyphPageTreeNode::getChild):
1959         (WebCore::GlyphPageTreeNode::pruneCustomFontData):
1960         (WebCore::GlyphPageTreeNode::pruneFontData):
1961         (WebCore::GlyphPageTreeNode::showSubtree):
1962         * platform/graphics/GlyphPageTreeNode.h:
1963         (GlyphPageTreeNode):
1964         (WebCore::GlyphPageTreeNode::GlyphPageTreeNode):
1965
1966 2012-10-09  Kent Tamura  <tkent@chromium.org>
1967
1968         Sub-fields in input[type=time] should not be focusable if the input is disabled or read-only
1969         https://bugs.webkit.org/show_bug.cgi?id=98850
1970
1971         Reviewed by Kentaro Hara.
1972
1973         Covered by additional test cases of
1974         time-multiple-fields/time-multiple-fields-keyboard-events.html and
1975         time-multiple-fields/time-multiple-fields-mouse-events.html.
1976
1977         * html/shadow/DateTimeFieldElement.h:
1978         (FieldOwner): Add isFieldOwnerDisabledOrReadOnly.
1979         * html/shadow/DateTimeFieldElement.cpp:
1980         (WebCore::DateTimeFieldElement::isFocusable):
1981         Check isFieldOwnerDisabledOrReadOnly, and calls HTMLElement::isFocusable()
1982         just in case.
1983         * html/shadow/DateTimeEditElement.cpp:
1984         (WebCore::DateTimeEditElement::isFieldOwnerDisabledOrReadOnly): Added.
1985         * html/shadow/DateTimeEditElement.h:
1986         (DateTimeEditElement): Declare isFieldOwnerDisabledOrReadOnly.
1987
1988 2012-10-09  Robert Kroeger  <rjkroege@chromium.org>
1989
1990         [chromium] revert fling deacceleration parameter change
1991         https://bugs.webkit.org/show_bug.cgi?id=98820
1992
1993         Reviewed by Adrienne Walker.
1994
1995         After an extended discussion, it has been decided that a previous
1996         adjustment to fling deacceleration parameters should be reverted.
1997
1998         Tested by existing unit tests.
1999
2000         * platform/TouchFlingPlatformGestureCurve.cpp:
2001         (WebCore::TouchFlingPlatformGestureCurve::createForTouchPad):
2002         (WebCore::TouchFlingPlatformGestureCurve::createForTouchScreen):
2003
2004 2012-10-09  Kent Tamura  <tkent@chromium.org>
2005
2006         Should reject invalid dates constructed with multiple fields UI
2007         https://bugs.webkit.org/show_bug.cgi?id=98727
2008
2009         Reviewed by Hajime Morita.
2010
2011         In input[type=date] with multiple fields UI, we allow users to set
2012         day-of-month value to 1-31 regardless of the month value. So users can
2013         construct an invalid date such as "2012-02-31". We should sanitize such
2014         values.
2015
2016         This change affects platforms with ENABLE_INPUT_TYPE_DATE &&
2017         ENABLE_INPUT_MULTIPLE_FIELDS_UI.
2018
2019         Test: fast/forms/date-multiple-fields/date-multiple-fields-keyboard-events.html
2020
2021         * html/BaseDateAndTimeInputType.h:
2022         (BaseDateAndTimeInputType): Make sanitizeValue protected to be called from
2023         BaseMultipleFieldsDateAndTimeInputType.
2024         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2025         (WebCore::BaseMultipleFieldsDateAndTimeInputType::editControlValueChanged):
2026         Apply sanitizeValue to a value constructed in UI.
2027         (WebCore::BaseMultipleFieldsDateAndTimeInputType::restoreFormControlState):
2028         Ditto.
2029
2030 2012-10-09  Joe Mason  <jmason@rim.com>
2031
2032         Check for null m_frame in NetworkJob
2033         https://bugs.webkit.org/show_bug.cgi?id=98830
2034
2035         Reviewed by George Staikos.
2036
2037         PR 220025
2038
2039         * platform/network/blackberry/NetworkJob.cpp:
2040         (WebCore::NetworkJob::sendRequestWithCredentials):
2041         (WebCore::NetworkJob::storeCredentials):
2042
2043 2012-10-09  Jian Li  <jianli@chromium.org>
2044
2045         Update the CSS property used to support draggable regions.
2046         https://bugs.webkit.org/show_bug.cgi?id=97156
2047
2048         Reviewed by Adam Barth.
2049
2050         The CSS property to support draggable regions has been changed from
2051         "-webkit-widget-region" to "-webkit-app-region" in the following syntax:
2052            -webkit-app-region: drag|no-drag
2053
2054         The CSS parsing code for draggable regions is now different from the CSS
2055         parsing code for dashboard regions since we have quite different syntax.
2056
2057         We still try to share as much rendering update code as possible for
2058         these two features. To make the shared code easier to understand for
2059         both features, the name "DashboardRegions" in the shared code is changed
2060         to "AnnotatedRegions" to work for both dashboard regions and draggable
2061         regions.
2062
2063         Note that we still using WIDGET_REGION as feature name in order not to
2064         add more changes to this patch. It will be renamed to a more appropriate
2065         name in next patch. WIDGET_REGION is now only turned on for the chromium
2066         port.
2067
2068         Test: fast/css/draggable-region-parser.html
2069
2070         * Configurations/FeatureDefines.xcconfig: Disable WIDGET_REGION feature.
2071         * WebCore.exp.in: Update the exported symbol due to renaming.
2072         * css/CSSComputedStyleDeclaration.cpp: Update the CSS parsing.
2073         (WebCore):
2074         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2075         * css/CSSParser.cpp: Update the CSS parsing.
2076         (WebCore::CSSParser::parseValue):
2077         (WebCore):
2078         (WebCore::CSSParser::parseDashboardRegions):
2079         * css/CSSParserValues.cpp: Update the CSS parsing.
2080         (WebCore::CSSParserValue::createCSSValue):
2081         * css/CSSPrimitiveValue.cpp: Update the CSS parsing.
2082         (WebCore::isValidCSSUnitTypeForDoubleConversion):
2083         (WebCore):
2084         (WebCore::CSSPrimitiveValue::cleanup):
2085         (WebCore::CSSPrimitiveValue::customCssText):
2086         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
2087         (WebCore::CSSPrimitiveValue::reportDescendantMemoryUsage):
2088         * css/CSSPrimitiveValue.h: Update the CSS parsing.
2089         (CSSPrimitiveValue):
2090         * css/CSSProperty.cpp:
2091         (WebCore::CSSProperty::isInheritedProperty):
2092         * css/CSSPropertyNames.in: Rename the CSS property for draggable region.
2093         * css/CSSValueKeywords.in: Add the keywords supported for the draggable region.
2094         * css/DashboardRegion.h: Remove WIDGET_REGION guard.
2095         (DashboardRegion):
2096         * css/StyleResolver.cpp: Update the CSS parsing.
2097         (WebCore::StyleResolver::collectMatchingRulesForList):
2098         * dom/Document.cpp: Rename dashboardRegions to annotatedRegions.
2099         (WebCore::Document::Document):
2100         (WebCore::Document::annotatedRegions):
2101         (WebCore::Document::setAnnotatedRegions):
2102         (WebCore::Document::reportMemoryUsage):
2103         * dom/Document.h: Rename dashboardRegions to annotatedRegions.
2104         (WebCore):
2105         (WebCore::Document::setAnnotatedRegionsDirty):
2106         (WebCore::Document::annotatedRegionsDirty):
2107         (WebCore::Document::hasAnnotatedRegions):
2108         (WebCore::Document::setHasAnnotatedRegions):
2109         (Document):
2110         * page/Chrome.cpp: Rename dashboardRegions to annotatedRegions.
2111         (WebCore::ChromeClient::annotatedRegionsChanged):
2112         * page/ChromeClient.h: Rename dashboardRegions to annotatedRegions.
2113         (ChromeClient):
2114         * page/FrameView.cpp: Rename dashboardRegions to annotatedRegions.
2115         (WebCore::FrameView::layout):
2116         (WebCore::FrameView::updateAnnotatedRegions):
2117         (WebCore::FrameView::paintContents):
2118         * page/FrameView.h: Rename dashboardRegions to annotatedRegions.
2119         (FrameView):
2120         * rendering/RenderInline.cpp:
2121         (WebCore::RenderInline::addAnnotatedRegions):
2122         * rendering/RenderInline.h: Rename dashboardRegions to annotatedRegions.
2123         (RenderInline):
2124         * rendering/RenderLayer.cpp: Rename dashboardRegions to annotatedRegions.
2125         (WebCore::RenderLayer::scrollTo):
2126         (WebCore::RenderLayer::setHasHorizontalScrollbar):
2127         (WebCore::RenderLayer::setHasVerticalScrollbar):
2128         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
2129         * rendering/RenderListBox.cpp: Rename dashboardRegions to annotatedRegions.
2130         (WebCore::RenderListBox::setHasVerticalScrollbar):
2131         * rendering/RenderObject.cpp: Rename dashboardRegions to annotatedRegions.
2132         (WebCore::RenderObject::styleWillChange):
2133         (WebCore::RenderObject::addAnnotatedRegions):
2134         (WebCore::RenderObject::collectAnnotatedRegions):
2135         * rendering/RenderObject.h: Rename dashboardRegions to annotatedRegions.
2136         (WebCore::AnnotatedRegionValue::operator==):
2137         (WebCore::AnnotatedRegionValue::operator!=):
2138         (AnnotatedRegionValue):
2139         (RenderObject):
2140         * rendering/style/RenderStyle.cpp: Update the CSS parsing.
2141         (WebCore::RenderStyle::diff):
2142         (WebCore):
2143         * rendering/style/RenderStyle.h: Update the CSS parsing.
2144         * rendering/style/RenderStyleConstants.h: Update the CSS parsing.
2145         * rendering/style/StyleDashboardRegion.h: Update the CSS parsing.
2146         * rendering/style/StyleRareNonInheritedData.cpp: Update the CSS parsing.
2147         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2148         (WebCore::StyleRareNonInheritedData::operator==):
2149         * rendering/style/StyleRareNonInheritedData.h: Update the CSS parsing.
2150         (WebCore):
2151         (StyleRareNonInheritedData):
2152
2153 2012-10-09  Sheriff Bot  <webkit.review.bot@gmail.com>
2154
2155         Unreviewed, rolling out r130811 and r130821.
2156         http://trac.webkit.org/changeset/130811
2157         http://trac.webkit.org/changeset/130821
2158         https://bugs.webkit.org/show_bug.cgi?id=98831
2159
2160         Broke date-suggestion-picker-appearance-with-scroll-bar.html
2161         (Requested by abarth|gardening on #webkit).
2162
2163         * WebCore.exp.in:
2164         * dom/ContainerNode.cpp:
2165         (WebCore::ContainerNode::getUpperLeftCorner):
2166         (WebCore::ContainerNode::getLowerRightCorner):
2167         * dom/MouseRelatedEvent.cpp:
2168         (WebCore::MouseRelatedEvent::computeRelativePosition):
2169         * dom/Node.cpp:
2170         (WebCore::Node::convertToPage):
2171         (WebCore::Node::convertFromPage):
2172         * editing/FrameSelection.cpp:
2173         (WebCore::CaretBase::absoluteBoundsForLocalRect):
2174         * editing/RenderedPosition.cpp:
2175         (WebCore::RenderedPosition::absoluteRect):
2176         * editing/VisiblePosition.cpp:
2177         (WebCore::VisiblePosition::absoluteCaretBounds):
2178         * html/HTMLSelectElement.cpp:
2179         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2180         * html/shadow/SliderThumbElement.cpp:
2181         (WebCore::SliderThumbElement::setPositionFromPoint):
2182         * html/shadow/SpinButtonElement.cpp:
2183         (WebCore::SpinButtonElement::defaultEventHandler):
2184         * page/FrameView.cpp:
2185         (WebCore::FrameView::convertFromRenderer):
2186         (WebCore::FrameView::convertToRenderer):
2187         * rendering/InlineTextBox.cpp:
2188         (WebCore::InlineTextBox::paintDocumentMarker):
2189         (WebCore::InlineTextBox::paintTextMatchMarker):
2190         (WebCore::InlineTextBox::computeRectForReplacementMarker):
2191         * rendering/LayoutState.cpp:
2192         (WebCore::LayoutState::LayoutState):
2193         * rendering/RenderBlock.cpp:
2194         (WebCore::RenderBlock::absoluteQuads):
2195         * rendering/RenderBox.cpp:
2196         (WebCore::RenderBox::absoluteQuads):
2197         (WebCore::RenderBox::absoluteContentBox):
2198         (WebCore::RenderBox::mapLocalToContainer):
2199         (WebCore::RenderBox::mapAbsoluteToLocalPoint):
2200         * rendering/RenderBox.h:
2201         (RenderBox):
2202         * rendering/RenderBoxModelObject.cpp:
2203         (WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
2204         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
2205         * rendering/RenderBoxModelObject.h:
2206         (RenderBoxModelObject):
2207         * rendering/RenderEmbeddedObject.cpp:
2208         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
2209         * rendering/RenderFrameSet.cpp:
2210         (WebCore::RenderFrameSet::userResize):
2211         * rendering/RenderGeometryMap.cpp:
2212         (WebCore::RenderGeometryMap::absolutePoint):
2213         * rendering/RenderInline.cpp:
2214         (WebCore::RenderInline::mapLocalToContainer):
2215         * rendering/RenderInline.h:
2216         (RenderInline):
2217         * rendering/RenderLayer.cpp:
2218         (WebCore::RenderLayer::absoluteToContents):
2219         (WebCore::RenderLayer::convertToLayerCoords):
2220         (WebCore::RenderLayer::scrollTo):
2221         (WebCore::RenderLayer::calculateClipRects):
2222         (WebCore::RenderLayer::childrenClipRect):
2223         (WebCore::RenderLayer::selfClipRect):
2224         * rendering/RenderLayerBacking.cpp:
2225         (WebCore::RenderLayerBacking::contentsVisible):
2226         * rendering/RenderMediaControls.cpp:
2227         (WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton):
2228         * rendering/RenderMenuList.cpp:
2229         (WebCore::RenderMenuList::showPopup):
2230         * rendering/RenderObject.cpp:
2231         (WebCore::RenderObject::absoluteFocusRingQuads):
2232         (WebCore::RenderObject::localToAbsolute):
2233         (WebCore::RenderObject::absoluteToLocal):
2234         (WebCore::RenderObject::mapLocalToContainer):
2235         (WebCore::RenderObject::mapAbsoluteToLocalPoint):
2236         (WebCore::RenderObject::localToContainerQuad):
2237         (WebCore::RenderObject::localToContainerPoint):
2238         * rendering/RenderObject.h:
2239         (RenderObject):
2240         (WebCore::RenderObject::localToAbsoluteQuad):
2241         * rendering/RenderText.cpp:
2242         (WebCore::RenderText::absoluteRectsForRange):
2243         (WebCore::RenderText::absoluteQuads):
2244         (WebCore::RenderText::absoluteQuadsForRange):
2245         * rendering/RenderTheme.cpp:
2246         (WebCore::RenderTheme::volumeSliderOffsetFromMuteButton):
2247         * rendering/RenderView.cpp:
2248         (WebCore::RenderView::mapLocalToContainer):
2249         (WebCore::RenderView::mapAbsoluteToLocalPoint):
2250         (WebCore::RenderView::selectionBounds):
2251         * rendering/RenderView.h:
2252         (RenderView):
2253         * rendering/RenderWidget.cpp:
2254         (WebCore::RenderWidget::updateWidgetGeometry):
2255         * rendering/svg/RenderSVGForeignObject.cpp:
2256         (WebCore::RenderSVGForeignObject::mapLocalToContainer):
2257         * rendering/svg/RenderSVGForeignObject.h:
2258         (RenderSVGForeignObject):
2259         * rendering/svg/RenderSVGInline.cpp:
2260         (WebCore::RenderSVGInline::mapLocalToContainer):
2261         * rendering/svg/RenderSVGInline.h:
2262         (RenderSVGInline):
2263         * rendering/svg/RenderSVGModelObject.cpp:
2264         (WebCore::RenderSVGModelObject::mapLocalToContainer):
2265         (WebCore::RenderSVGModelObject::absoluteQuads):
2266         * rendering/svg/RenderSVGModelObject.h:
2267         (RenderSVGModelObject):
2268         * rendering/svg/RenderSVGRoot.cpp:
2269         (WebCore::RenderSVGRoot::mapLocalToContainer):
2270         * rendering/svg/RenderSVGRoot.h:
2271         (RenderSVGRoot):
2272         * rendering/svg/RenderSVGText.cpp:
2273         (WebCore::RenderSVGText::mapLocalToContainer):
2274         (WebCore::RenderSVGText::absoluteQuads):
2275         * rendering/svg/RenderSVGText.h:
2276         (RenderSVGText):
2277         * rendering/svg/SVGRenderSupport.cpp:
2278         (WebCore::SVGRenderSupport::mapLocalToContainer):
2279         * svg/SVGSVGElement.cpp:
2280         (WebCore::SVGSVGElement::localCoordinateSpaceTransform):
2281
2282 2012-10-09  Sheriff Bot  <webkit.review.bot@gmail.com>
2283
2284         Unreviewed, rolling out r130812.
2285         http://trac.webkit.org/changeset/130812
2286         https://bugs.webkit.org/show_bug.cgi?id=98826
2287
2288         Caused fast/text/shaping/shaping-selection-rect to fail
2289         (Requested by abarth|gardening on #webkit).
2290
2291         * platform/graphics/Font.cpp:
2292         (WebCore::Font::width):
2293         * platform/graphics/Font.h:
2294         (Font):
2295         * platform/graphics/mac/ComplexTextController.cpp:
2296         (WebCore::TextLayout::width):
2297         (WebCore::Font::width):
2298         (WebCore::ComplexTextController::advance):
2299         * platform/graphics/mac/ComplexTextController.h:
2300         (ComplexTextController):
2301         * rendering/RenderBlock.h:
2302         (WebCore):
2303         (LineBreaker):
2304         (RenderBlock):
2305         * rendering/RenderBlockLineLayout.cpp:
2306         (WebCore::setLogicalWidthForTextRun):
2307         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
2308         (WebCore::RenderBlock::createLineBoxesFromBidiRuns):
2309         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
2310         (WebCore::textWidth):
2311         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
2312
2313 2012-10-09  Ryosuke Niwa  <rniwa@webkit.org>
2314
2315         DOM/textarea-edit.html spends 35% of time in numGraphemeClusters
2316         https://bugs.webkit.org/show_bug.cgi?id=98711
2317
2318         Reviewed by Kent Tamura.
2319
2320         Since the number of characters is always greater than the number of grapheme clusters,
2321         we can avoid calling computeLengthForSubmission when the number of characters is less
2322         than maxlength. We still have to count the number of LFs since they all need to be
2323         converted into CRLFs. This improves WebKit's score on DOM/textarea-edit.html by 45%.
2324
2325         * html/HTMLTextAreaElement.cpp:
2326         (WebCore::computeLengthForSubmission):
2327         (WebCore::numberOfLineBreaks):
2328         (WebCore::upperBoundForLengthForSubmission): Added.
2329         (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
2330         (WebCore::HTMLTextAreaElement::tooLong):
2331
2332 2012-10-09  Nate Chapin  <japhet@chromium.org>
2333
2334         Make CachedResourceLoader RefCounted and have both Document
2335         and DocumentLoader hold RefPtrs. This is in preparation for
2336         caching main resources.
2337         https://bugs.webkit.org/show_bug.cgi?id=86787
2338
2339         Reviewed by Adam Barth.
2340
2341         No new tests, no functionality changes at this time.
2342
2343         * WebCore.exp.in:
2344         * WebCore.xcodeproj/project.pbxproj:
2345         * dom/Document.cpp:
2346         (WebCore::Document::Document): Only create our own CachedResourceLoader
2347             if we were given a null frame.
2348         (WebCore::Document::~Document):
2349         (WebCore::Document::cachedResourceLoader):
2350         (WebCore):
2351         * dom/Document.h:
2352         (Document):
2353         * loader/DocumentLoader.cpp: Throughout, use our m_cachedResourceLoader instead
2354             of the Document's pointer.
2355         (WebCore::DocumentLoader::DocumentLoader): Create a CachedResourceLoader.
2356         (WebCore::DocumentLoader::~DocumentLoader):
2357         (WebCore::DocumentLoader::isLoadingInAPISense):
2358         (WebCore::DocumentLoader::subresource):
2359         (WebCore::DocumentLoader::getSubresources):
2360         * loader/DocumentLoader.h:
2361         (WebCore::DocumentLoader::cachedResourceLoader):
2362         (DocumentLoader):
2363         * loader/SubresourceLoader.cpp: Remove m_document, since it only existed to keep alive and access the CachedResourceLoader.
2364             It can now be accessed from m_documentLoader.
2365         (WebCore::SubresourceLoader::SubresourceLoader):
2366         (WebCore::SubresourceLoader::~SubresourceLoader):
2367         (WebCore::SubresourceLoader::willSendRequest):
2368         (WebCore::SubresourceLoader::releaseResources):
2369         * loader/SubresourceLoader.h:
2370         (SubresourceLoader):
2371         * loader/cache/CachedResourceLoader.cpp: Handle the possibility of a null Document in several places.
2372         (WebCore::CachedResourceLoader::CachedResourceLoader):
2373         (WebCore::CachedResourceLoader::~CachedResourceLoader):
2374         (WebCore::CachedResourceLoader::frame):
2375         (WebCore::CachedResourceLoader::canRequest):
2376         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
2377         (WebCore::CachedResourceLoader::printAccessDeniedMessage):
2378         (WebCore::CachedResourceLoader::loadDone):
2379         * loader/cache/CachedResourceLoader.h:
2380         (WebCore):
2381         (WebCore::CachedResourceLoader::create): Add create(), make constructor private.
2382         (CachedResourceLoader):
2383         (WebCore::CachedResourceLoader::document):
2384         (WebCore::CachedResourceLoader::setDocument):
2385         (WebCore::CachedResourceLoader::clearDocumentLoader):
2386
2387 2012-10-09  Alexander Shalamov  <alexander.shalamov@intel.com>
2388
2389         CSS Style is not recalculated when media attribute of style element is changed
2390         https://bugs.webkit.org/show_bug.cgi?id=96752
2391
2392         Reviewed by Kenneth Rohde Christiansen.
2393
2394         When "media" attribute of style element is changed, style should be recalculated.
2395         This patch modifies HTMLStyleElement::parseAttribute, so that when the media attribute
2396         is updated, new MediaQuerySet is created and applied to the style element then, document
2397         style is recalculated. Since media query set is updated for CSSStyleSheet, CSSOM wrapper
2398         for media query should be updated as well in order to sync with new media query set value.
2399
2400         Test: fast/media/mq-js-update-media.html
2401
2402         * css/CSSStyleSheet.cpp:
2403         (WebCore::CSSStyleSheet::setMediaQueries):
2404         * html/HTMLStyleElement.cpp:
2405         (WebCore::HTMLStyleElement::parseAttribute):
2406
2407 2012-10-09  Ben Murdoch  <benm@google.com>
2408
2409         [chromium][Android] Add WebSecurityOrigin::grantLoadLocalResources()
2410         https://bugs.webkit.org/show_bug.cgi?id=97689
2411
2412         Reviewed by Adam Barth.
2413
2414         In addition to the WebKit/chromium side of the change, remove the
2415         ASSERT in SecurityOrigin::grantLoadLocalResources(). Android WebView
2416         is a legitimate user of this API in cases where neither of the
2417         ASSERT'd conditions hold.
2418
2419         * page/SecurityOrigin.cpp:
2420         (WebCore::SecurityOrigin::grantLoadLocalResources): Remove ASSERT.
2421
2422 2012-10-09  Jon Lee  <jonlee@apple.com>
2423
2424         Build fix for Qt Windows.
2425
2426         * html/HTMLPlugInElement.h: Include Image.h.
2427
2428 2012-10-09  Enrica Casucci  <enrica@apple.com>
2429
2430         Only measure text once instead of twice when performing line layout.
2431         https://bugs.webkit.org/show_bug.cgi?id=98317
2432         <rdar://problem/12080821>
2433
2434         Reviewed by Dan Bernstein.
2435
2436         Since we are measuring each word to find out where the line break should occur,
2437         we should cache that information to avoid measuring the run again when
2438         creating the line box. The bulk of the change is in nextLineBreak, where
2439         the measurements are collected and placed in a vector so that they can
2440         be consumed in setLogicalWidthForTextRun where we used to measure the
2441         text one more time.
2442         Each entry in the vector is a WordMeasurement object that contains information
2443         about the start and end offset in the run, the renderer, the measured width
2444         and, possibly, a list of fallback fonts.
2445         When we need to compute the width of the run to create the line box, we add
2446         all the measurements for the given renderer in the run to get the total width.
2447
2448         * platform/graphics/Font.cpp:
2449         (WebCore::Font::width): Added fallback fonts parameter.
2450         * platform/graphics/Font.h:
2451         (Font): Added fallback fonts parameter to the width static member function.
2452         This method is called when we compute the width using TextLayout.
2453         * platform/graphics/mac/ComplexTextController.cpp:
2454         (WebCore::TextLayout::width): Added fallback fonts parameter.
2455         (WebCore::Font::width):
2456         (WebCore::ComplexTextController::advance):
2457         * platform/graphics/mac/ComplexTextController.h:
2458         (ComplexTextController): Added fallback fonts parameter to advance method.
2459         * rendering/RenderBlock.h: Added WordMeasures parameter to few methods.
2460         * rendering/RenderBlockLineLayout.cpp:
2461         (WordMeasurement): Added new class to hold measurement information.
2462         (WebCore::setLogicalWidthForTextRun): This is where we compute the run width using the
2463         cached information.
2464         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Added wordMeasures parameter.
2465         (WebCore::RenderBlock::createLineBoxesFromBidiRuns): Added wordMeasures parameter.
2466         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Added declaration of the WordMeasures
2467         vector and its use.
2468         (WebCore::textWidth): Added fallbackFonts parameter, since now we only measure once.
2469         (WebCore::RenderBlock::LineBreaker::nextLineBreak): This method has been modified to collect
2470         the measurements of the individual words and add them to the vector.
2471
2472 2012-10-09  Levi Weintraub  <leviw@chromium.org>
2473
2474         [Sub pixel layout] Fast-path iframe scrolling can picks up an extra pixel
2475         https://bugs.webkit.org/show_bug.cgi?id=98571
2476
2477         Reviewed by Emil A Eklund.
2478
2479         Refactoring all coordinate-switching functionality to use a single "mode" flag
2480         as opposed to having a bunch of boolean values. This enables the same set of
2481         options across the board, and a consistent interface. This was previously
2482         done for mapLocalToContainer.
2483
2484         The imptetus for this for this stems from the one logical change in this patch
2485         which only effects sub-pixel layout. FrameView::convertToRenderer and
2486         convertFromRenderer return IntPoint coordinates, and need to also snap transform
2487         offsets to determine proper rects for scrolling.
2488
2489         Unlabeled functions below are simply being updated to these new interfaces.
2490
2491         Test: fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html
2492
2493         * WebCore.exp.in:
2494         * dom/ContainerNode.cpp:
2495         (WebCore::ContainerNode::getUpperLeftCorner):
2496         (WebCore::ContainerNode::getLowerRightCorner):
2497         * dom/Element.cpp:
2498         (WebCore::Element::boundsInRootViewSpace):
2499         * dom/MouseRelatedEvent.cpp:
2500         (WebCore::MouseRelatedEvent::computeRelativePosition):
2501         * dom/Node.cpp:
2502         (WebCore::Node::convertToPage):
2503         (WebCore::Node::convertFromPage):
2504         * html/HTMLSelectElement.cpp:
2505         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2506         * html/shadow/SliderThumbElement.cpp:
2507         (WebCore::SliderThumbElement::setPositionFromPoint):
2508         * html/shadow/SpinButtonElement.cpp:
2509         (WebCore::SpinButtonElement::defaultEventHandler):
2510         * page/FrameView.cpp:
2511         (WebCore::FrameView::convertToRenderer): Now pixel-snaps offsets before passing
2512         them to TransformState, which transforms the coordinates.
2513         (WebCore::FrameView::convertFromRenderer): Ditto.
2514         * rendering/LayoutState.cpp:
2515         (WebCore::LayoutState::LayoutState):
2516         * rendering/RenderBlock.cpp:
2517         (WebCore::RenderBlock::absoluteQuads):
2518         * rendering/RenderBox.cpp:
2519         (WebCore::RenderBox::absoluteQuads):
2520         (WebCore::RenderBox::mapLocalToContainer):
2521         (WebCore::RenderBox::mapAbsoluteToLocalPoint):
2522         * rendering/RenderBox.h:
2523         (RenderBox):
2524         * rendering/RenderBoxModelObject.cpp:
2525         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
2526         * rendering/RenderBoxModelObject.h:
2527         (RenderBoxModelObject):
2528         * rendering/RenderEmbeddedObject.cpp:
2529         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
2530         * rendering/RenderFrameSet.cpp:
2531         (WebCore::RenderFrameSet::userResize):
2532         * rendering/RenderGeometryMap.cpp:
2533         (WebCore::RenderGeometryMap::absolutePoint):
2534         * rendering/RenderInline.cpp:
2535         (WebCore::RenderInline::mapLocalToContainer):
2536         * rendering/RenderInline.h:
2537         (RenderInline):
2538         * rendering/RenderLayer.cpp:
2539         (WebCore::RenderLayer::absoluteToContents):
2540         (WebCore::RenderLayer::calculateClipRects):
2541         * rendering/RenderMediaControls.cpp:
2542         (WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton):
2543         * rendering/RenderMenuList.cpp:
2544         (WebCore::RenderMenuList::showPopup):
2545         * rendering/RenderObject.cpp:
2546         (WebCore::RenderObject::localToAbsolute):
2547         (WebCore::RenderObject::absoluteToLocal):
2548         (WebCore::RenderObject::mapLocalToContainer):
2549         (WebCore::RenderObject::mapAbsoluteToLocalPoint):
2550         (WebCore::RenderObject::localToContainerQuad):
2551         (WebCore::RenderObject::localToContainerPoint):
2552         * rendering/RenderObject.h:
2553         (RenderObject): MapLocalToContainerFlags is now MapCoordinatesFlags since it's
2554         now used for other conversion methods.
2555         (WebCore::RenderObject::localToAbsoluteQuad):
2556         * rendering/RenderTheme.cpp:
2557         (WebCore::RenderTheme::volumeSliderOffsetFromMuteButton):
2558         * rendering/RenderView.cpp:
2559         (WebCore::RenderView::mapLocalToContainer):
2560         (WebCore::RenderView::mapAbsoluteToLocalPoint):
2561         * rendering/RenderView.h:
2562         (RenderView):
2563         * rendering/svg/RenderSVGForeignObject.cpp:
2564         (WebCore::RenderSVGForeignObject::mapLocalToContainer):
2565         * rendering/svg/RenderSVGForeignObject.h:
2566         (RenderSVGForeignObject):
2567         * rendering/svg/RenderSVGInline.cpp:
2568         (WebCore::RenderSVGInline::mapLocalToContainer):
2569         * rendering/svg/RenderSVGInline.h:
2570         (RenderSVGInline):
2571         * rendering/svg/RenderSVGModelObject.cpp:
2572         (WebCore::RenderSVGModelObject::mapLocalToContainer):
2573         * rendering/svg/RenderSVGModelObject.h:
2574         (RenderSVGModelObject):
2575         * rendering/svg/RenderSVGRoot.cpp:
2576         (WebCore::RenderSVGRoot::mapLocalToContainer):
2577         * rendering/svg/RenderSVGRoot.h:
2578         (RenderSVGRoot):
2579         * rendering/svg/RenderSVGText.cpp:
2580         (WebCore::RenderSVGText::mapLocalToContainer):
2581         * rendering/svg/RenderSVGText.h:
2582         (RenderSVGText):
2583         * rendering/svg/SVGRenderSupport.cpp:
2584         (WebCore::SVGRenderSupport::mapLocalToContainer):
2585         * svg/SVGSVGElement.cpp:
2586         (WebCore::SVGSVGElement::localCoordinateSpaceTransform):
2587
2588 2012-10-09  Jon Lee  <jonlee@apple.com>
2589
2590         [WK2] Have plugins render offscreen to capture snapshot
2591         https://bugs.webkit.org/show_bug.cgi?id=98326
2592         <rdar://problem/12426658>
2593
2594         Reviewed by Simon Fraser.
2595
2596         Change updateSnapshot() to use a PassRefPtr<Image> instead of Image*. WebKit2 ultimately
2597         hands the image off to RenderSnapshottedPlugin. A CachedImage instance then manages the
2598         lifetime of the Image.
2599
2600         * html/HTMLPlugInElement.h:
2601         (WebCore::HTMLPlugInElement::updateSnapshot):
2602         * html/HTMLPlugInImageElement.cpp:
2603         (WebCore::HTMLPlugInImageElement::updateSnapshot):
2604         * html/HTMLPlugInImageElement.h:
2605         (HTMLPlugInImageElement):
2606         * rendering/RenderSnapshottedPlugIn.cpp:
2607         (WebCore::RenderSnapshottedPlugIn::updateSnapshot): Updated to use the PassRefPtr<Image>
2608         pointer.
2609         * rendering/RenderSnapshottedPlugIn.h:
2610         (RenderSnapshottedPlugIn):
2611
2612 2012-10-09  Adam Barth  <abarth@webkit.org>
2613
2614         Unreviewed. Move this file to where the build systems think it should
2615         be. See https://bugs.webkit.org/show_bug.cgi?id=94755
2616
2617         * platform/graphics/CustomFilterConstants.h: Removed.
2618         * platform/graphics/filters/CustomFilterConstants.h: Copied from Source/WebCore/platform/graphics/CustomFilterConstants.h.
2619
2620 2012-10-09  Tony Chang  <tony@chromium.org>
2621
2622         Use computeLogical* methods instead of updateLogical* methods in RenderImage
2623         https://bugs.webkit.org/show_bug.cgi?id=98802
2624
2625         Reviewed by Eric Seidel.
2626
2627         We were storing the old values of width/height, calling updateLogical{Width,Height}, then restoring
2628         the old values.  Instead, use the computeLogical{Width,Height} methods so we don't have to overwrite
2629         the current values.
2630
2631         No new tests, this is just a refactoring.
2632
2633         * rendering/RenderImage.cpp:
2634         (WebCore::RenderImage::imageDimensionsChanged):
2635
2636 2012-10-09  Enrica Casucci  <enrica@apple.com>
2637
2638         [chromium] fast/text/international/text-spliced-font.html and fast/writing-mode/Kusa-Makura-
2639         background-canvas.html failing on the Mac after r130443
2640         https://bugs.webkit.org/show_bug.cgi?id=98545
2641
2642         Reviewed by Tony Chang.
2643
2644         Adding back the ! removed by mistake before submitting r130779. 
2645
2646         * platform/graphics/FontFastPath.cpp:
2647         (WebCore::Font::glyphDataAndPageForCharacter):
2648
2649 2012-10-09  Artem Simonov  <asimonov@rim.com>
2650
2651         [BlackBerry] EGL Context deleted prematurely in GraphicsContext3D destructor
2652         https://bugs.webkit.org/show_bug.cgi?id=98796
2653
2654         Reviewed by George Staikos.
2655
2656         Reordered destruction of GraphicsContext3D so that the compositing layer is
2657         destroyed first.
2658
2659         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
2660         (WebCore::GraphicsContext3D::~GraphicsContext3D):
2661
2662 2012-10-09  Ben Wagner  <bungeman@chromium.org>
2663
2664         Disable hinting when webkit-font-smoothing:antialiased is used on Mac.
2665         https://bugs.webkit.org/show_bug.cgi?id=98061
2666
2667         Reviewed by Stephen White.
2668
2669         Normal anti-aliased text matches subpixel anti-aliased text.
2670         However, text marked with webkit-font-smoothing:antialiased should be drawn without hinting to match Safari.
2671         See crbug.com/152304 . 
2672
2673         Test is fast/css/font-smoothing.html, but DRT runs with font smoothing disabled, so no change visible. 
2674
2675         * platform/graphics/skia/FontSkia.cpp:
2676         (WebCore::setupPaint):
2677         Set kNo_Hinting when webkit-font-smoothing is antialiased.
2678
2679 2012-10-09  Max Vujovic  <mvujovic@adobe.com>
2680
2681         [CSS Shaders] Create constants for vertex attribute sizes and offsets
2682         https://bugs.webkit.org/show_bug.cgi?id=94755
2683
2684         Reviewed by Dean Jackson.
2685
2686         Factor out the vertex attribute size and offset constants into a new file,
2687         CustomFilterConstants.h. Replace literals in CustomFilterMeshGenerator with the constants.
2688
2689         I could have added the constants to CustomFilterMeshGenerator.h, but this would make
2690         FECustomFilter depend on CustomFilterMeshGenerator.
2691
2692         I also could have added the constants to CustomFilterMesh.h, but this would make
2693         CustomFilterMeshGenerator depend on CustomFilterMesh.
2694
2695         No new tests. No change in behavior.
2696
2697         * GNUmakefile.list.am:
2698         * Target.pri:
2699         * WebCore.gypi:
2700         * WebCore.vcproj/WebCore.vcproj:
2701         * WebCore.xcodeproj/project.pbxproj:
2702         * platform/graphics/CustomFilterConstants.h: Added.
2703         (WebCore):
2704         * platform/graphics/filters/CustomFilterMeshGenerator.h:
2705         (WebCore::CustomFilterMeshGenerator::floatsPerVertex):
2706             Use the new constants instead of literal values.
2707         * platform/graphics/filters/FECustomFilter.cpp:
2708         (WebCore::FECustomFilter::bindProgramAndBuffers):
2709             Pull the constant definitions out of here.
2710
2711 2012-10-09  Michael Saboff  <msaboff@apple.com>
2712
2713         MarkupAccumulator should optimally handle 8 bit Strings
2714         https://bugs.webkit.org/show_bug.cgi?id=98224
2715
2716         Reviewed by Ryosuke Niwa.
2717
2718         Updated appendCharactersReplacingEntities to take a string, offset and length and process 8 or 16 bit
2719         data as appropriate.  Also made it a member function of MarkupAccumulator.
2720
2721         No new tests, behavior covered by existing tests.
2722
2723         * editing/MarkupAccumulator.cpp:
2724         (WebCore::MarkupAccumulator::appendCharactersReplacingEntities):
2725         (WebCore::MarkupAccumulator::appendAttributeValue):
2726         (WebCore::MarkupAccumulator::appendNodeValue):
2727         * editing/MarkupAccumulator.h:
2728         (MarkupAccumulator):
2729         * editing/markup.cpp:
2730         (WebCore::StyledMarkupAccumulator::appendText):
2731         (WebCore::urlToMarkup):
2732
2733 2012-10-09  Joshua Bell  <jsbell@chromium.org>
2734
2735         IndexedDB: Overflowing key generator should throw ConstraintError
2736         https://bugs.webkit.org/show_bug.cgi?id=98807
2737
2738         Reviewed by Tony Chang.
2739
2740         After the WebKit implementation landed throwing DataError, public-webapps
2741         consensus was that the exception thrown should be ConstraintError. Trivial
2742         change, and we pass one more W3C test submission.
2743
2744         Test: storage/indexeddb/key-generator.html
2745
2746         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2747         (WebCore::IDBObjectStoreBackendImpl::putInternal):
2748
2749 2012-10-08  Martin Robinson  <mrobinson@igalia.com>
2750
2751         Fix the order of the statements in my previous build fix.
2752
2753         Reviewed by Gustavo Noronha Silva.
2754
2755         My previous build build fix for ResourceHandleSoup ordered the assignment
2756         of the local ResourceHandleInternal incorrectly. Instead of being before
2757         both assertions, it should be interspersed among them.
2758
2759         * platform/network/soup/ResourceHandleSoup.cpp:
2760         (WebCore::createSoupMessageForHandleAndRequest):
2761
2762 2012-10-09  Beth Dakin  <bdakin@apple.com>
2763
2764         https://bugs.webkit.org/show_bug.cgi?id=98457
2765         ScrollingStateNodes should be referenced via IDs on 
2766         RenderLayerBacking
2767
2768         Reviewed by Simon Fraser.
2769
2770         This patch associates all ScrollingStateNodes with a 
2771         RenderLayerBacking via a HashMap from RenderLayerBackings to 
2772         ScrollingStateNodes on ScrollingCoordinator. Prior to this patch, the 
2773         root ScrollingStateNode was created immediately upon creation of the 
2774         ScrollingCoordinator, and it was constantly re-used for every main 
2775         FrameView. This doesn't work in the new model since that doesn't 
2776         allow that ScrollingStateNode to have a definite association with a 
2777         RenderLayerBacking. So this patch does also introduce some lifetime 
2778         differences with the ScrollingStateNodes.
2779
2780         If a page is going into the page cache, we should clear the state 
2781         tree. When the page is in the cache, we won't have access to the 
2782         RenderLayerBacking, and we don't want to be doing anything with the 
2783         ScrollingStateNodes anyway.
2784         * dom/Document.cpp:
2785         (WebCore::Document::setInPageCache):
2786
2787         When a page is restored from the page cache, call 
2788         frameViewRootLayerDidChange() to re-create the state tree.
2789         * loader/HistoryController.cpp:
2790         (WebCore::HistoryController::restoreScrollPositionAndViewState):
2791
2792         This new FrameView function will return the scrollLayerID for a given FrameView.
2793         * page/FrameView.cpp:
2794         (WebCore::FrameView::scrollLayerID):
2795         (WebCore):
2796         * page/FrameView.h:
2797         (FrameView):
2798
2799         There is a lot of unfortunate fiddling with the terrible 
2800         if-defs in ScrollingCoordinator. I added a FIXME to the header
2801         noting how we can avoid this in the future.
2802         * page/scrolling/ScrollingCoordinator.cpp:
2803
2804         All of this code used to refer to the rootStateNode directly. 
2805         Instead, now it looks up the proper ScrollingStateNode for the given 
2806         FrameView in the HashMap.
2807         (WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
2808         (WebCore::ScrollingCoordinator::frameViewWheelEventHandlerCountChanged):
2809         (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
2810         (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
2811         (WebCore::ScrollingCoordinator::updateMainFrameScrollLayerPosition):
2812         (WebCore::ScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
2813         (WebCore::ScrollingCoordinator::setScrollLayerForNode):
2814         (WebCore::ScrollingCoordinator::setNonFastScrollableRegionForNode):
2815         (WebCore::ScrollingCoordinator::setScrollParametersForNode):
2816         (WebCore::ScrollingCoordinator::setWheelEventHandlerCountForNode):
2817
2818         Returns the existing ScrollingStateNode for a given FrameView by 
2819         looking it up in the HashMap.
2820         (WebCore::ScrollingCoordinator::stateNodeForFrameView):
2821
2822         This is called when a RenderLayerBacking is destroyed. At that time, 
2823         its associated ScrollingStateNode is destroyed.
2824         (WebCore::ScrollingCoordinator::detachFromStateTree):
2825
2826         clearStateTree() clears the HashMap and destroys all of the nodes in 
2827         the current state tree.
2828         (WebCore::ScrollingCoordinator::clearStateTree):
2829
2830         Creates a new root state node for the given FrameView.
2831         (WebCore::ScrollingCoordinator::ensureRootStateNodeForFrameView):
2832
2833         Some new functions for the new node stuff.
2834         * page/scrolling/ScrollingCoordinator.h:
2835         * page/scrolling/ScrollingCoordinatorNone.cpp:
2836         (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
2837         (WebCore::ScrollingCoordinator::supportsFixedPositionLayers):
2838         (WebCore::ScrollingCoordinator::setLayerIsContainerForFixedPositionLayers):
2839         (WebCore::ScrollingCoordinator::setLayerIsFixedToContainerLayer):
2840         (WebCore::ScrollingCoordinator::scrollableAreaScrollLayerDidChange):
2841         (WebCore::ScrollingCoordinator::detachFromStateTree):
2842         (WebCore::ScrollingCoordinator::clearStateTree):
2843         (WebCore::ScrollingCoordinator::ensureRootStateNodeForFrameView):
2844         (WebCore::setScrollParameters):
2845         (WebCore::setWheelEventHandlerCount):
2846
2847         New remove functions are used when the sate tree is cleared and when 
2848         a RenderLayerBacking is destroyed.
2849         * page/scrolling/ScrollingStateNode.cpp:
2850         (WebCore::ScrollingStateNode::removeChild):
2851         (WebCore):
2852         * page/scrolling/ScrollingStateNode.h:
2853         (WebCore::ScrollingStateNode::isScrollingStateScrollingNode):
2854         (ScrollingStateNode):
2855         (WebCore::ScrollingStateNode::parent):
2856
2857         New convenience function for casting to ScrollingStateScrollingNodes.
2858         * page/scrolling/ScrollingStateScrollingNode.h:
2859         (WebCore::toScrollingStateScrollingNode):
2860         (WebCore):
2861
2862         No longer automatically create a root node upon creation of the 
2863         ScrollingStateTree. We now want to wait to create the root node until 
2864         we have a RenderLayerBacking to associate it with.
2865         * page/scrolling/ScrollingStateTree.cpp:
2866         (WebCore::ScrollingStateTree::ScrollingStateTree):
2867         (WebCore::ScrollingStateTree::removeNode):
2868         (WebCore):
2869         * page/scrolling/ScrollingStateTree.h:
2870         (WebCore::ScrollingStateTree::setRootStateNode):
2871         (ScrollingStateTree):
2872
2873         RenderLayerBacking has a new data member called m_scrollLayerID. If 
2874         this RenderLayerBacking is represented in the scrolling tree, then 
2875         the ID with be unique and non-zero. 
2876         * rendering/RenderLayerBacking.cpp:
2877         (WebCore::RenderLayerBacking::RenderLayerBacking):
2878         (WebCore::RenderLayerBacking::~RenderLayerBacking):
2879         (WebCore::generateScrollLayerID):
2880         (WebCore):
2881         (WebCore::RenderLayerBacking::attachToScrollingCoordinator):
2882         (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
2883         * rendering/RenderLayerBacking.h:
2884         (RenderLayerBacking):
2885         (WebCore::RenderLayerBacking::scrollLayerID):
2886
2887         Move the call to ScrollingCooridinator::frameViewRootLayerDidChange() 
2888         from RenderLayerCompositor::attachRootLayer() to 
2889         RenderLayerCompositor:: updateBacking(). The problem with the old call 
2890         site is that there is no backing at that time, so we are trying to set 
2891         state on the root scrolling state node before we have enough 
2892         information to create that node and add it to the HashMap.
2893         * rendering/RenderLayerCompositor.cpp:
2894         (WebCore::RenderLayerCompositor::updateBacking):
2895         (WebCore::RenderLayerCompositor::attachRootLayer):
2896
2897 2012-10-09  Florin Malita  <fmalita@chromium.org>
2898
2899         SVGResources should use HashSet<AtomicString> instead of HashSet<AtomicStringImpl*>
2900         https://bugs.webkit.org/show_bug.cgi?id=98683
2901
2902         Reviewed by Darin Adler.
2903
2904         Eric's notes:
2905
2906         SVGResources should use HashSet<AtomicString> instead of HashSet<AtomicStringImpl*>
2907         They do basically the same thing, and the former is much more common (and less code). It's
2908         also safe, on the off-chance that we're using AtomicStrings which might otherwise go away.
2909
2910         No new tests, refactoring. 
2911
2912         * rendering/svg/SVGResources.cpp:
2913         (WebCore::clipperFilterMaskerTags):
2914         (WebCore::markerTags):
2915         (WebCore::fillAndStrokeTags):
2916         (WebCore::chainableResourceTags):
2917         (WebCore::SVGResources::buildCachedResources):
2918
2919 2012-10-09  Enrica Casucci  <enrica@apple.com>
2920
2921         [chromium] fast/text/international/text-spliced-font.html and fast/writing-mode/Kusa-Makura-background-canvas.html
2922         failing on the Mac after r130443
2923         https://bugs.webkit.org/show_bug.cgi?id=98545
2924
2925         Reviewed by Tony Chang.
2926
2927         Fixes a regression introduced with r130443.
2928         No new tests added since we already have tests covering this.
2929         Updated TestExpectations for chromium and mac.
2930
2931         * platform/graphics/FontFastPath.cpp:
2932         (WebCore::Font::glyphDataAndPageForCharacter): Text orientation should not be
2933         taken into account if the character is an ideograph or a symbol.
2934
2935 2012-10-09  Philip Rogers  <pdr@google.com>
2936
2937         Prevent animation when CSS attributeType is invalid.
2938         https://bugs.webkit.org/show_bug.cgi?id=94569
2939
2940         Reviewed by Dirk Schulze.
2941
2942         This patch changes hasValidAttributeType() to return false when
2943         we have attributeType=CSS with a non-CSS attribute name.
2944
2945         Previously we would animate non-CSS attributes when attributeType was
2946         CSS which resulted in crashes. To track this case, this patch catches
2947         changes to targetElement, attributeName, and attributeType and checks
2948         if an invalid combination is present. If invalid, hasInvalidCSSAttributeType()
2949         will return true causing hasValidAttributeType() to return false and prevent
2950         the animation from running.
2951
2952         Tests: svg/animations/animate-css-xml-attributeType.html
2953                svg/animations/invalid-css-attribute-crash-expected.svg
2954                svg/animations/invalid-css-attribute-crash.svg
2955
2956         * svg/SVGAnimateElement.cpp:
2957         (WebCore::SVGAnimateElement::hasValidAttributeType):
2958         (WebCore::SVGAnimateElement::targetElementWillChange):
2959         * svg/SVGAnimationElement.cpp:
2960         (WebCore::SVGAnimationElement::SVGAnimationElement):
2961         (WebCore::SVGAnimationElement::isSupportedAttribute):
2962
2963             This now supports the attributeType attribute which is stored in m_attributeType.
2964
2965         (WebCore::SVGAnimationElement::parseAttribute):
2966         (WebCore::SVGAnimationElement::setAttributeType):
2967
2968             Changes to attributeType, attributeName, and targetElement need to be tracked
2969             to determine when an invalid combination happens.
2970
2971         (WebCore::SVGAnimationElement::targetElementWillChange):
2972         (WebCore):
2973         (WebCore::SVGAnimationElement::setAttributeName):
2974         (WebCore::SVGAnimationElement::checkInvalidCSSAttributeType):
2975         * svg/SVGAnimationElement.h:
2976         (WebCore::SVGAnimationElement::attributeType):
2977         (SVGAnimationElement):
2978         (WebCore::SVGAnimationElement::hasInvalidCSSAttributeType):
2979         * svg/animation/SVGSMILElement.cpp:
2980         (WebCore::SVGSMILElement::targetElement):
2981         * svg/animation/SVGSMILElement.h:
2982         (SVGSMILElement):
2983
2984 2012-10-09  Pravin D  <pravind.2k4@gmail.com>
2985
2986         max-width property is does not overriding the width properties for css tables(display:table)
2987         https://bugs.webkit.org/show_bug.cgi?id=98455
2988
2989         Reviewed by Tony Chang.
2990
2991         The max-width property determines the maximum computed width an element can have. In case of css tables(display:table),
2992         the computed was not being limited by the max-width property. The current patch fixes this issue.
2993
2994         Test: fast/table/css-table-max-width.html
2995
2996         * rendering/RenderTable.cpp:
2997         (WebCore::RenderTable::updateLogicalWidth):
2998          Logic to compute the logical width of an element such that it does not exceed the max-width value.
2999          Also when both min-width and max-width are present, the following contraint is used to compute the logical width:
3000            1) min-width < Computed LogicalWidth < max-width, when min-width < max-width.
3001            2) Computed LogicalWidth = min-width, when min-width > max-width.
3002
3003 2012-10-09  Harald Alvestrand  <hta@google.com>
3004
3005         Change PeerConnection getStats function to single value local / remote
3006         elements in RTCStatsReport.
3007
3008         https://bugs.webkit.org/show_bug.cgi?id=98753
3009
3010         Reviewed by Adam Barth.
3011
3012         IDL of RTCStatsReport has been changed to make local/remote
3013         single valued RTCStatsElement attributes.
3014         The RTCStatsReport argument to index the list of RTCStatsElement
3015         in the local and remote functions has been removed.
3016
3017         Tested by modifications to RTCPeerConnection-stats.html
3018
3019         * Modules/mediastream/RTCStatsReport.cpp:
3020         (WebCore::RTCStatsReport::addElement):
3021         (WebCore::RTCStatsReport::addStatistic):
3022         * Modules/mediastream/RTCStatsReport.h:
3023         (WebCore::RTCStatsReport::local):
3024         (WebCore::RTCStatsReport::remote):
3025         (RTCStatsReport):
3026         * Modules/mediastream/RTCStatsReport.idl:
3027         * Modules/mediastream/RTCStatsResponse.cpp:
3028         (WebCore::RTCStatsResponse::addElement):
3029         (WebCore::RTCStatsResponse::addStatistic):
3030         * Modules/mediastream/RTCStatsResponse.h:
3031         (RTCStatsResponse):
3032         * platform/chromium/support/WebRTCStatsResponse.cpp:
3033         (WebKit::WebRTCStatsResponse::addElement):
3034         (WebKit::WebRTCStatsResponse::addStatistic):
3035         * platform/mediastream/RTCStatsResponseBase.h:
3036         (RTCStatsResponseBase):
3037
3038 2012-10-09  Antonio Gomes  <agomes@rim.com>
3039
3040         Get rid of FIXED_POSITION_CREATES_STACKING_CONTEXT in favor of Settings::fixedPositionCreatesStackingContext()
3041         https://bugs.webkit.org/show_bug.cgi?id=98756
3042
3043         Reviewed by Rob Buis.
3044
3045         No behavior change so no new tests.
3046
3047         * css/StyleResolver.cpp:
3048         (WebCore::StyleResolver::collectMatchingRulesForList):
3049
3050 2012-10-09  Simon Hausmann  <simon.hausmann@digia.com>
3051
3052         [Qt] Fix build with QtMultimedia
3053
3054         Reviewed by Tor Arne Vestbø.
3055
3056         This is an initial rudimentary port to of the QtMultimedia back-end,
3057         adapted to slight API changes and (more importantly) to the
3058         implementation of QAbstractVideoSurface instead of using
3059         QGraphicsVideoItem (which is in QtMultimediaWidgets).
3060
3061         * WebCore.pri:
3062         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
3063         (WebCore::MediaPlayerPrivateQt::supportsType):
3064         (WebCore::MediaPlayerPrivateQt::MediaPlayerPrivateQt):
3065         (WebCore::MediaPlayerPrivateQt::~MediaPlayerPrivateQt):
3066         (WebCore::MediaPlayerPrivateQt::didLoadingProgress):
3067         (WebCore::MediaPlayerPrivateQt::totalBytes):
3068         (WebCore::MediaPlayerPrivateQt::setVisible):
3069         (WebCore::MediaPlayerPrivateQt::surfaceFormatChanged):
3070         (WebCore::MediaPlayerPrivateQt::setSize):
3071         (WebCore::MediaPlayerPrivateQt::removeVideoItem):
3072         (WebCore::MediaPlayerPrivateQt::restoreVideoItem):
3073         (WebCore):
3074         (WebCore::MediaPlayerPrivateQt::start):
3075         (WebCore::MediaPlayerPrivateQt::supportedPixelFormats):
3076         (WebCore::MediaPlayerPrivateQt::present):
3077         (WebCore::MediaPlayerPrivateQt::paint):
3078         (WebCore::MediaPlayerPrivateQt::paintCurrentFrameInContext):
3079         (WebCore::MediaPlayerPrivateQt::paintToTextureMapper):
3080         * platform/graphics/qt/MediaPlayerPrivateQt.h:
3081         (MediaPlayerPrivateQt):
3082
3083 2012-10-09  Garrett Casto  <gcasto@chromium.org>
3084
3085         Allow users to specify a different hover image for TextFieldDecorationElement
3086         https://bugs.webkit.org/show_bug.cgi?id=93662
3087
3088         Reviewed by Kent Tamura.
3089
3090         * html/shadow/TextFieldDecorationElement.cpp:
3091         (WebCore::TextFieldDecorationElement::TextFieldDecorationElement):
3092         (WebCore::TextFieldDecorationElement::updateImage):
3093         (WebCore::TextFieldDecorationElement::defaultEventHandler): Handles mouseover and mouseout events.
3094         (WebCore::TextFieldDecorationElement::willRespondToMouseMoveEvents): Now returns true if the element is not disabled.
3095         (WebCore):
3096         * html/shadow/TextFieldDecorationElement.h:
3097         (TextFieldDecorator):
3098         (TextFieldDecorationElement):
3099
3100 2012-10-09  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3101
3102         [Qt] Uploading images to Google+ using QtWebKit does not work.
3103         https://bugs.webkit.org/show_bug.cgi?id=72329
3104
3105         Reviewed by Jocelyn Turcotte.
3106
3107         Implement handling of Blob FormData, including its extensions to the File FormData.
3108
3109         * platform/network/qt/QNetworkReplyHandler.cpp:
3110         (WebCore::FormDataIODevice::FormDataIODevice):
3111         (WebCore::appendBlobResolved):
3112         (WebCore::FormDataIODevice::prepareFormElements):
3113         (WebCore::FormDataIODevice::computeSize):
3114         (WebCore::FormDataIODevice::moveToNextElement):
3115         (WebCore::FormDataIODevice::prepareCurrentElement):
3116         (WebCore::FormDataIODevice::openFileForCurrentElement):
3117         (WebCore::FormDataIODevice::readData):
3118         (WebCore::QNetworkReplyHandler::sendNetworkRequest):
3119         * platform/network/qt/QNetworkReplyHandler.h:
3120         (FormDataIODevice):
3121
3122 2012-10-09  Arpita Bahuguna  <arpitabahuguna@gmail.com>
3123
3124         Text decorations specified on the containing block are not properly applied when ::first-line is present.
3125         https://bugs.webkit.org/show_bug.cgi?id=93829
3126
3127         Reviewed by Abhishek Arya.
3128
3129         If a container's style and its pseudo :first-line style have unique
3130         text-decorations specified for them, only the :first-line text-decoarations
3131         were being applied.
3132
3133         The uploaded patch intends to first compute the text decoration colors
3134         for the containing box, followed by that of the first-line (if specified).
3135
3136         This thus avoids the condition wherein our containing box's text-decorations
3137         were not getting applied at all since initially we were only computing
3138         for the first-line style.
3139
3140         Test: fast/css/text-decorations-on-first-line-and-containing-block.html
3141
3142         * rendering/InlineTextBox.cpp:
3143         (WebCore::InlineTextBox::paintDecoration):
3144         getTextDecorationColors() is first called for computing the containing box's
3145         text-decoration values and then for first-line style's text-decorations,
3146         if specified.
3147
3148 2012-10-09  Sheriff Bot  <webkit.review.bot@gmail.com>
3149
3150         Unreviewed, rolling out r130746.
3151         http://trac.webkit.org/changeset/130746
3152         https://bugs.webkit.org/show_bug.cgi?id=98749
3153
3154         It made 45 tests crash on Qt (Requested by Ossy on #webkit).
3155
3156         * platform/network/qt/QNetworkReplyHandler.cpp:
3157         (WebCore::FormDataIODevice::FormDataIODevice):
3158         (WebCore::FormDataIODevice::computeSize):
3159         (WebCore::FormDataIODevice::moveToNextElement):
3160         (WebCore::FormDataIODevice::openFileForCurrentElement):
3161         (WebCore::FormDataIODevice::readData):
3162         (WebCore::QNetworkReplyHandler::getIODevice):
3163         (WebCore::QNetworkReplyHandler::sendNetworkRequest):
3164         * platform/network/qt/QNetworkReplyHandler.h:
3165         (QNetworkReplyHandler):
3166         (FormDataIODevice):
3167
3168 2012-10-09  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3169
3170         [Qt] Uploading images to Google+ using QtWebKit does not work.
3171         https://bugs.webkit.org/show_bug.cgi?id=72329
3172
3173         Reviewed by Jocelyn Turcotte.
3174
3175         Implement handling of Blob FormData, including its extensions to the File FormData.
3176
3177         * platform/network/qt/QNetworkReplyHandler.cpp:
3178         (WebCore::FormDataIODevice::FormDataIODevice):
3179         (WebCore::FormDataIODevice::computeSize):
3180         (WebCore::FormDataIODevice::moveToNextElement):
3181         (WebCore::FormDataIODevice::prepareCurrentElement):
3182         (WebCore::FormDataIODevice::openFileForCurrentElement):
3183         (WebCore::FormDataIODevice::readData):
3184         (WebCore::QNetworkReplyHandler::getIODevice):
3185         (WebCore::QNetworkReplyHandler::handleBlobDataIfAny):
3186         (WebCore::QNetworkReplyHandler::sendNetworkRequest):
3187         * platform/network/qt/QNetworkReplyHandler.h:
3188         (QNetworkReplyHandler):
3189         (FormDataIODevice):
3190
3191 2012-10-09  Keishi Hattori  <keishi@webkit.org>
3192
3193         Page popup should be smarter about its layout
3194         https://bugs.webkit.org/show_bug.cgi?id=98499
3195
3196         Reviewed by Kent Tamura.
3197
3198         This change fixes these two issues:
3199         1. Page popup should reposition itself so it won't get clipped by screen(Win/Linux) or rootview(Mac) bounds.
3200         2. Page popup should resize itself when it doesn't fit.
3201
3202         Test: platform/chromium/fast/forms/page-popup/page-popup-adjust-rect.html
3203
3204         * Resources/pagepopups/calendarPicker.js:
3205         (initialize): We need to set global.params at the beginning because we need it for resizeWindow().
3206         * Resources/pagepopups/colorSuggestionPicker.js: Added global.params.
3207         (handleMessage):
3208         (initialize):
3209         (handleArgumentsTimeout):
3210         * Resources/pagepopups/pickerCommon.js:
3211         (Rect): Represents an axis aligned rectangle.
3212         (Rect.prototype.get maxX): Gets position of right edge.
3213         (Rect.prototype.get maxY): Gets position of bottom edge.
3214         (Rect.prototype.toString):
3215         (Rect.intersection): Returns the intersection of two rectangles.
3216         (resizeWindow): Resize window to a certain size. Don't allow shrinking.
3217         (adjustWindowRect): Calculates the best position and size for the popup.
3218         (_adjustWindowRectVertically):
3219         (_adjustWindowRectHorizontally):
3220         (setWindowRect): Sets the position and size of the popup to the given rect.
3221         * Resources/pagepopups/suggestionPicker.css:
3222         (.suggestion-list): Don't show horizontal scroll bar.
3223         * Resources/pagepopups/suggestionPicker.js:
3224         (SuggestionPicker.prototype._fixWindowSize): 
3225         * page/PagePopupClient.cpp:
3226         (WebCore::PagePopupClient::addProperty): For adding an int to JSON.
3227         (WebCore::PagePopupClient::addProperty): For adding an IntRect to JSON.
3228         (WebCore):
3229         * page/PagePopupClient.h:
3230         (PagePopupClient):
3231
3232 2012-10-09  Hajime Morrita  <morrita@google.com>
3233
3234         [Refactoring] Scoped Style related code should have its own class.
3235         https://bugs.webkit.org/show_bug.cgi?id=98244
3236
3237         Reviewed by Dimitri Glazkov.
3238
3239         This change extracts StyleScopeResolver from StyleResolver to clarify
3240         the responsibility of the style scope handling. Now we can easily see
3241         where the style scoping needs to be involed.
3242
3243         Coming Shadow DOM related change like @host rules will fit within this class.
3244
3245         No new tests, refactoring.
3246
3247         * CMakeLists.txt:
3248         * GNUmakefile.list.am:
3249         * Target.pri:
3250         * WebCore.gypi:
3251         * WebCore.xcodeproj/project.pbxproj:
3252         * css/CSSAllInOne.cpp:
3253         * css/StyleResolver.cpp:
3254         (WebCore::StyleResolver::StyleResolver):
3255         (WebCore::StyleResolver::collectFeatures):
3256         (WebCore::StyleResolver::appendAuthorStylesheets):
3257         (WebCore::StyleResolver::pushParentElement):
3258         (WebCore::StyleResolver::popParentElement):
3259         (WebCore::StyleResolver::pushParentShadowRoot):
3260         (WebCore::StyleResolver::popParentShadowRoot):
3261         (WebCore::StyleResolver::matchScopedAuthorRules):
3262         (WebCore::StyleResolver::collectMatchingRulesForList):
3263         (WebCore::StyleResolver::reportMemoryUsage):
3264         * css/StyleResolver.h:
3265         (StyleResolver):
3266         * css/StyleScopeResolver.cpp: Added.
3267         (WebCore):
3268         (WebCore::StyleScopeResolver::StyleScopeResolver):
3269         (WebCore::StyleScopeResolver::~StyleScopeResolver):
3270         (WebCore::StyleScopeResolver::scopeFor):
3271         (WebCore::StyleScopeResolver::ruleSetFor):
3272         (WebCore::StyleScopeResolver::ensureRuleSetFor):
3273         (WebCore::StyleScopeResolver::setupStack):
3274         (WebCore::StyleScopeResolver::push):
3275         (WebCore::StyleScopeResolver::pop):
3276         (WebCore::StyleScopeResolver::collectFeaturesTo):
3277         (WebCore::StyleScopeResolver::reportMemoryUsage):
3278         * css/StyleScopeResolver.h: Added.
3279         (WebCore):
3280         (StyleScopeResolver):
3281         (WebCore::StyleScopeResolver::StackFrame::StackFrame):
3282         (StackFrame):
3283         (WebCore::StyleScopeResolver::hasScopedStyles):
3284         (WebCore::StyleScopeResolver::stackSize):
3285         (WebCore::StyleScopeResolver::stackFrameAt):
3286         (WebCore::StyleScopeResolver::matchesStyleBounds):
3287         (WebCore::StyleScopeResolver::stackIsConsistent):
3288         (WebCore::StyleScopeResolver::ensureStackConsistency):
3289         (WebCore::StyleScopeResolver::scopeFor):
3290         (WebCore::StyleScopeResolver::ensureRuleSetFor):
3291
3292 2012-10-08  Simon Hausmann  <simon.hausmann@digia.com>
3293
3294         [Qt] Make RenderThemeQStyle/ScrollbarThemeQStyle compile without QStyle/QtWidgets
3295         https://bugs.webkit.org/show_bug.cgi?id=98268
3296
3297         Reviewed by Tor Arne Vestbø.
3298
3299         Extracted QStyle/QWidget related code into a QWebStyle class that implements the QStyleFacade interface.
3300
3301         QStyleFacade is a pure interface that lives in WebCore/platform/qt
3302         (next to RenderThemeQStyle and ScrollbarThemeQStyle) and provides a
3303         minimal interface of what we need to draw with QStyle as well as basic
3304         hit testing and metric retrieval. It also provides a
3305         QStyleFacadeOption class that aggregates common meta-data for
3306         rendering primitives, such as direction, rectangle, state (sunken,
3307         enabled, etc.) or palette. It also provides some more slider/scrollbar
3308         specific fields in a slider sub-structure.
3309
3310         RenderThemeQStyle/ScrollbarThemeQStyle used to instantiate specific QStyleOption sub-classes and populate
3311         them with state information from render objects, before calling straight to QStyle. Most of the common code
3312         was encapsulated in StylePainterQStyle.
3313
3314         The new RenderThemeQStyle/ScrolllbarThemeQStyle uses common code in
3315         StylePainterQStyle to populate state into QStyleFacadeOption before
3316         calling into QStyleFacade.
3317
3318         The style facade is then implemented by QStyleFacadeImp, which extracts
3319         meta-data from QStyleFacadeOption arguments, populates style
3320         primitive specific QStyleOption objects and then calls on QStyle.
3321
3322         RenderThemeQStyle/ScrollbarThemeQStyle can only use interface methods
3323         from QStyleFacade. QStyleFacadeImp on the other hand will live in the
3324         separate QtWebKitWidgets library in the future and therefore cannot use
3325         any WebCore types.
3326
3327         * Target.pri:
3328         * platform/qt/QStyleFacade.cpp: Added.
3329         (WebCore):
3330         (WebCore::QStyleFacade::styleForPage):
3331         * platform/qt/QStyleFacade.h: Added.
3332         (WebCore):
3333         (QStyleFacade):
3334         (WebCore::QStyleFacade::~QStyleFacade):
3335         (WebCore::QStyleFacadeOption::QStyleFacadeOption):
3336         (QStyleFacadeOption):
3337         * platform/qt/RenderThemeQStyle.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp.
3338         (WebCore):
3339         (WebCore::RenderThemeQStyle::getStylePainter):
3340         (WebCore::StylePainterQStyle::StylePainterQStyle):
3341         (WebCore::StylePainterQStyle::init):
3342         (WebCore::RenderThemeQStyle::create):
3343         (WebCore::RenderThemeQStyle::setStyleFactoryFunction):
3344         (WebCore::RenderThemeQStyle::styleFactory):
3345         (WebCore::RenderThemeQStyle::RenderThemeQStyle):
3346         (WebCore::RenderThemeQStyle::~RenderThemeQStyle):
3347         (WebCore::RenderThemeQStyle::setPaletteFromPageClientIfExists):
3348         (WebCore::RenderThemeQStyle::inflateButtonRect):
3349         (WebCore::RenderThemeQStyle::computeSizeBasedOnStyle):
3350         (WebCore::RenderThemeQStyle::adjustButtonStyle):
3351         (WebCore::RenderThemeQStyle::setButtonPadding):
3352         (WebCore::RenderThemeQStyle::paintButton):
3353         (WebCore::RenderThemeQStyle::paintTextField):
3354         (WebCore::RenderThemeQStyle::adjustTextAreaStyle):
3355         (WebCore::RenderThemeQStyle::paintTextArea):
3356         (WebCore::RenderThemeQStyle::setPopupPadding):
3357         (WebCore::RenderThemeQStyle::colorPalette):
3358         (WebCore::RenderThemeQStyle::paintMenuList):
3359         (WebCore::RenderThemeQStyle::adjustMenuListButtonStyle):
3360         (WebCore::RenderThemeQStyle::paintMenuListButton):
3361         (WebCore::RenderThemeQStyle::animationDurationForProgressBar):
3362         (WebCore::RenderThemeQStyle::paintProgressBar):
3363         (WebCore::RenderThemeQStyle::paintSliderTrack):
3364         (WebCore::RenderThemeQStyle::adjustSliderTrackStyle):
3365         (WebCore::RenderThemeQStyle::paintSliderThumb):
3366         (WebCore::RenderThemeQStyle::adjustSliderThumbStyle):
3367         (WebCore::RenderThemeQStyle::paintSearchField):
3368         (WebCore::RenderThemeQStyle::adjustSearchFieldDecorationStyle):
3369         (WebCore::RenderThemeQStyle::paintSearchFieldDecoration):
3370         (WebCore::RenderThemeQStyle::adjustSearchFieldResultsDecorationStyle):
3371         (WebCore::RenderThemeQStyle::paintSearchFieldResultsDecoration):
3372         (WebCore::RenderThemeQStyle::paintInnerSpinButton):
3373         (WebCore::RenderThemeQStyle::initializeCommonQStyleOptions):
3374         (WebCore::RenderThemeQStyle::adjustSliderThumbSize):
3375         * platform/qt/RenderThemeQStyle.h: Renamed from Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.h.
3376         (WebCore):
3377         (RenderThemeQStyle):
3378         (WebCore::RenderThemeQStyle::qStyle):
3379         (StylePainterQStyle):
3380         (WebCore::StylePainterQStyle::isValid):
3381         (WebCore::StylePainterQStyle::paintButton):
3382         (WebCore::StylePainterQStyle::paintTextField):
3383         (WebCore::StylePainterQStyle::paintComboBox):
3384         (WebCore::StylePainterQStyle::paintComboBoxArrow):
3385         (WebCore::StylePainterQStyle::paintSliderTrack):
3386         (WebCore::StylePainterQStyle::paintSliderThumb):
3387         (WebCore::StylePainterQStyle::paintInnerSpinButton):
3388         (WebCore::StylePainterQStyle::paintProgressBar):
3389         (WebCore::StylePainterQStyle::paintScrollCorner):
3390         (WebCore::StylePainterQStyle::paintScrollBar):
3391         * platform/qt/ScrollbarThemeQStyle.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/ScrollbarThemeQStyle.cpp.
3392         (WebCore):
3393         (WebCore::ScrollbarThemeQStyle::ScrollbarThemeQStyle):
3394         (WebCore::ScrollbarThemeQStyle::~ScrollbarThemeQStyle):
3395         (WebCore::scPart):
3396         (WebCore::scrollbarPart):
3397         (WebCore::initSliderStyleOption):
3398         (WebCore::ScrollbarThemeQStyle::paint):
3399         (WebCore::ScrollbarThemeQStyle::hitTest):
3400         (WebCore::ScrollbarThemeQStyle::shouldCenterOnThumb):
3401         (WebCore::ScrollbarThemeQStyle::invalidatePart):
3402         (WebCore::ScrollbarThemeQStyle::scrollbarThickness):
3403         (WebCore::ScrollbarThemeQStyle::thumbPosition):
3404         (WebCore::ScrollbarThemeQStyle::thumbLength):
3405         (WebCore::ScrollbarThemeQStyle::trackPosition):
3406         (WebCore::ScrollbarThemeQStyle::trackLength):
3407         (WebCore::ScrollbarThemeQStyle::paintScrollCorner):
3408         * platform/qt/ScrollbarThemeQStyle.h: Renamed from Source/WebKit/qt/WebCoreSupport/ScrollbarThemeQStyle.h.
3409         (WebCore):
3410         (ScrollbarThemeQStyle):
3411         (WebCore::ScrollbarThemeQStyle::qStyle):
3412
3413 2012-10-08  Kiran Muppala  <cmuppala@apple.com>
3414
3415         Throttle DOM timers on hidden pages.
3416         https://bugs.webkit.org/show_bug.cgi?id=98474
3417
3418         Reviewed by Maciej Stachowiak.
3419
3420         When the visibility of a page changes to "hidden", all it's DOM timers are
3421         updated to align their fire times on one second intervals.  This limits the
3422         number of CPU wakes due to a hidden pages to one per second.
3423
3424         Test: fast/dom/timer-throttling-hidden-page.html
3425
3426         * Configurations/FeatureDefines.xcconfig:
3427         * WebCore.exp.in:
3428         * dom/Document.cpp:
3429         (WebCore):
3430         (WebCore::Document::timerAlignmentInterval):
3431         Read Page::timerAlignmentInterval and pass it along to DOMTimer.
3432
3433         * dom/Document.h:
3434         (Document):
3435         * dom/ScriptExecutionContext.cpp:
3436         (WebCore):
3437         (WebCore::ScriptExecutionContext::didChangeTimerAlignmentInterval):
3438         Scan through self DOM Timers and tell them to recompute their fire
3439         time based on the updated alignment interval.
3440         (WebCore::ScriptExecutionContext::timerAlignmentInterval):
3441
3442         * dom/ScriptExecutionContext.h:
3443         (ScriptExecutionContext):
3444         * page/DOMTimer.cpp:
3445       &n